@@ -161,11 +161,6 @@ def test_bare_string_expected_output_no_match(self):
161161 assert is_in ("cms" , {"expected_output" : "elasticsearch" }) is False
162162
163163
164- # ---------------------------------------------------------------------------
165- # TestMakeExactMatchEvaluator
166- # ---------------------------------------------------------------------------
167-
168-
169164class TestMakeExactMatchEvaluator :
170165 def test_returns_callable_named_exact_match (self ):
171166 fn = make_exact_match_evaluator ()
@@ -214,11 +209,6 @@ def test_only_first_expected_item_is_compared(self):
214209 assert exact_match ("b" , {"expected_output" : ["a" , "b" ]}) is False
215210
216211
217- # ---------------------------------------------------------------------------
218- # TestMakeContainsEvaluator
219- # ---------------------------------------------------------------------------
220-
221-
222212class TestMakeContainsEvaluator :
223213 def test_returns_callable_named_contains (self ):
224214 fn = make_contains_evaluator ()
@@ -272,11 +262,6 @@ def test_inversion_pattern(self):
272262 assert contains ("safe text" , {"expected_output" : ["forbidden" ]}) is not True
273263
274264
275- # ---------------------------------------------------------------------------
276- # TestMakeRegexEvaluator
277- # ---------------------------------------------------------------------------
278-
279-
280265class TestMakeRegexEvaluator :
281266 def test_returns_callable_named_regex_match (self ):
282267 fn = make_regex_evaluator ()
@@ -339,11 +324,6 @@ def test_invalid_regex_raises_re_error(self):
339324 regex_match ("hello" , {"expected_output" : ["[invalid" ]})
340325
341326
342- # ---------------------------------------------------------------------------
343- # TestMakeJsonMatchEvaluator
344- # ---------------------------------------------------------------------------
345-
346-
347327class TestMakeJsonMatchEvaluator :
348328 def test_returns_callable_named_json_match (self ):
349329 fn = make_json_match_evaluator ()
@@ -435,10 +415,6 @@ def test_extra_keys_in_output_are_ignored(self):
435415 ) == pytest .approx (1.0 )
436416
437417
438- # ---------------------------------------------------------------------------
439- # TestMakeSchemaEvaluator
440- # ---------------------------------------------------------------------------
441-
442418_SIMPLE_SCHEMA = {
443419 "type" : "object" ,
444420 "properties" : {
@@ -503,11 +479,6 @@ def test_jsonschema_absent_raises_import_error(
503479 make_schema_evaluator (_SIMPLE_SCHEMA )
504480
505481
506- # ---------------------------------------------------------------------------
507- # TestMakeNumericToleranceEvaluator
508- # ---------------------------------------------------------------------------
509-
510-
511482class TestMakeNumericToleranceEvaluator :
512483 def test_returns_callable_named_numeric_close (self ):
513484 fn = make_numeric_tolerance_evaluator ()
@@ -578,11 +549,6 @@ def test_bare_string_expected(self):
578549 assert numeric_close ("2.718" , {"expected_output" : "2.72" }) is True
579550
580551
581- # ---------------------------------------------------------------------------
582- # TestMakeLlmJudgeEvaluator
583- # ---------------------------------------------------------------------------
584-
585-
586552def _make_mock_model (return_value : object ) -> MagicMock :
587553 """Build a MagicMock that satisfies BaseChatModel.with_structured_output."""
588554 chain = MagicMock ()
@@ -688,8 +654,6 @@ def test_missing_expected_key_sends_empty_string(self):
688654 prompt_used = chain .invoke .call_args [0 ][0 ]
689655 assert "Expected: \n " in prompt_used
690656
691- # -- on_error="silent" ---------------------------------------------------
692-
693657 def test_on_error_silent_float_returns_zero (self ):
694658 model = _make_mock_model (_FloatVerdict (1.0 ))
695659 chain = model .with_structured_output .return_value
@@ -716,8 +680,6 @@ def test_on_error_silent_bool_returns_false(self):
716680 result = llm_judge ("output" , {"expected_output" : ["ref" ]})
717681 assert result is False
718682
719- # -- on_error="reraise" --------------------------------------------------
720-
721683 def test_on_error_reraise_calls_callback_and_reraises (self ):
722684 model = _make_mock_model (_FloatVerdict (1.0 ))
723685 chain = model .with_structured_output .return_value
0 commit comments