Skip to content

Commit 9f2e2b5

Browse files
test: check both predicates match on overlap fixtures
1 parent ed7f91a commit 9f2e2b5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/test_tool_dispatch_adversarial.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,18 @@ def _assert_task_message_beats_async(result: dict[str, object]) -> None:
9292
),
9393
}
9494

95+
_INVARIANT_PREDICATES = dict(zip(ORDERING_INVARIANT_IDS, ORDERING_INVARIANTS, strict=True))
96+
9597

9698
@pytest.mark.parametrize(
9799
"fixture_id",
98100
ORDERING_INVARIANT_IDS,
99101
)
100102
def test_adversarial_overlap_classifies_documented_winner(fixture_id: str) -> None:
101103
blob, assert_winner = _INVARIANT_BEHAVIOR[fixture_id]
104+
before, after, _ = _INVARIANT_PREDICATES[fixture_id]
105+
assert before(blob), f"{fixture_id}: fixture no longer matches {before.__name__}"
106+
assert after(blob), f"{fixture_id}: fixture no longer matches {after.__name__}"
102107
result = _parse_tool_result(blob)
103108
assert result is not None
104109
assert_winner(result)

0 commit comments

Comments
 (0)