Skip to content

Commit 8ad0a0f

Browse files
committed
fix(test): use result.reason instead of result.error in test_error_handling
GraderScore does not have an 'error' attribute. When RelevanceGrader catches an exception, it stores the error message in the 'reason' field.
1 parent 1c9884f commit 8ad0a0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/graders/common/test_relevance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ async def test_error_handling(self):
139139
response="Python is a programming language.",
140140
)
141141

142-
# Assertions
143-
assert "Evaluation error: API Error" in result.error
142+
# Assertions - error message is stored in reason field when exception occurs
143+
assert "Evaluation error: API Error" in result.reason
144144

145145

146146
# ==================== QUALITY TESTS ====================

0 commit comments

Comments
 (0)