From f9b76ee104d5aaa64c8670d9bd986f27affc3177 Mon Sep 17 00:00:00 2001 From: Siddharth Sahu <112792547+sahusiddharth@users.noreply.github.com> Date: Mon, 27 Jan 2025 06:44:17 +0530 Subject: [PATCH] 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. --- tests/unit/test_dataset_schema.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_dataset_schema.py b/tests/unit/test_dataset_schema.py index f908609c1..d8d3b9af7 100644 --- a/tests/unit/test_dataset_schema.py +++ b/tests/unit/test_dataset_schema.py @@ -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 " + in error_message + ) + assert "expected " in error_message def test_base_eval_sample():