test: assert specific missing question_id in T6 invariant error match
This commit is contained in:
@@ -274,7 +274,7 @@ class TestUnitLevelAggregation:
|
|||||||
_make_question("s2", answer="A"),
|
_make_question("s2", answer="A"),
|
||||||
]
|
]
|
||||||
records = [_make_record("s1", prediction="B", answer="B")] # 缺 s2 的 record
|
records = [_make_record("s1", prediction="B", answer="B")] # 缺 s2 的 record
|
||||||
with pytest.raises(ValueError, match=r"缺 prediction.*聚合不变量被破坏"):
|
with pytest.raises(ValueError, match=r"s2.*缺 prediction.*聚合不变量被破坏"):
|
||||||
_aggregate_results(records, questions, "run-broken-invariant")
|
_aggregate_results(records, questions, "run-broken-invariant")
|
||||||
|
|
||||||
def test_empty_records_returns_zero(self) -> None:
|
def test_empty_records_returns_zero(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user