Kill the mutants that survived on the lines the release review changed

This commit is contained in:
2026-11-19 13:44:12 +01:00
parent 2edbde8071
commit 2806a8edc9
19 changed files with 452 additions and 6 deletions
+16
View File
@@ -5,6 +5,7 @@ import pathlib
import subprocess
import sys
import tempfile
import time
import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
@@ -60,6 +61,21 @@ class Replayed(unittest.TestCase):
self.assertNotIn(("b", high), asked)
self.assertEqual(search(["a"], [MIDDLE], {REFERENCE: {"a": set()}}, [high]), (Replay([set()], [], None, []), [("a", REFERENCE)]))
def test_says_what_it_replays_on_each_rung_and_replays_no_more_cases_at_once_than_asked(self):
high = Rung("claude-fable-5-2", "low")
said, running, most = [], [], {}
def replay_one(case, rung):
running.append(case)
most[rung] = max(most.get(rung, 0), len(running))
time.sleep(0.02)
running.remove(case)
return {0}
replayed(["a", "b", "c"], REFERENCE, [MIDDLE], replay_one, lambda _, reply: sorted(reply), "verdicts", said.append, 1, [high])
self.assertEqual(said, [f"replaying 3 verdicts on {REFERENCE}", f"replaying 3 verdicts on {high}", f"replaying 3 verdicts on {MIDDLE}"])
self.assertEqual(most, {REFERENCE: 1, high: 1, MIDDLE: 1})
def test_stops_at_a_usage_limit(self):
limit = Limited(None, "limit")
self.assertEqual(search(["a"], [MIDDLE], {REFERENCE: {"a": {0}}, MIDDLE: {"a": {0}}, CHEAP: limit}, [CHEAP])[0], limit)