Skip to content

Commit f9b76ee

Browse files
Fix Broken Test Case Due to Changed Error Message (#1881)
This PR addresses a failing test case caused by changes introduced in PR #1879, which modified the error message format. The test has been updated to reflect the new error message, ensuring it passes successfully.
1 parent 501fee7 commit f9b76ee

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/unit/test_dataset_schema.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,13 @@ def test_single_type_evaluation_dataset(eval_sample):
129129
with pytest.raises(ValueError) as exc_info:
130130
EvaluationDataset(samples=[single_turn_sample, multi_turn_sample])
131131

132-
assert "All samples must be of the same type" in str(exc_info.value)
132+
error_message = str(exc_info.value)
133+
134+
assert (
135+
"Sample at index 1 is of type <class 'ragas.dataset_schema.MultiTurnSample'>"
136+
in error_message
137+
)
138+
assert "expected <class 'ragas.dataset_schema.SingleTurnSample'>" in error_message
133139

134140

135141
def test_base_eval_sample():

0 commit comments

Comments
 (0)