Skip to content

Commit

Permalink
Fix Broken Test Case Due to Changed Error Message (#1881)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sahusiddharth authored Jan 27, 2025
1 parent 501fee7 commit f9b76ee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/unit/test_dataset_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,13 @@ def test_single_type_evaluation_dataset(eval_sample):
with pytest.raises(ValueError) as exc_info:
EvaluationDataset(samples=[single_turn_sample, multi_turn_sample])

assert "All samples must be of the same type" in str(exc_info.value)
error_message = str(exc_info.value)

assert (
"Sample at index 1 is of type <class 'ragas.dataset_schema.MultiTurnSample'>"
in error_message
)
assert "expected <class 'ragas.dataset_schema.SingleTurnSample'>" in error_message


def test_base_eval_sample():
Expand Down

0 comments on commit f9b76ee

Please sign in to comment.