Kill the surviving mutants of claudeMdExcludes and wait-for's half-line cut
CI / tests (pull_request) Successful in 2m11s

This commit is contained in:
2026-11-12 09:20:11 +01:00
parent 58133e69fe
commit 1d1172098f
2 changed files with 32 additions and 1 deletions
+14
View File
@@ -69,6 +69,20 @@ class WaitFor(unittest.TestCase):
self.assertEqual(main.waited(str(self.file), None, 60, clock), "No findings.")
self.assertEqual(clock.now, main.POLL_SECONDS)
def test_takes_a_whole_line_at_once_beside_a_half_written_one(self):
self.file.write_text("a\nb\npart")
clock = Clock()
self.assertEqual(main.waited(str(self.file), "b", 60, clock), "b")
self.assertEqual(clock.now, 0)
self.file.write_text("done\n")
self.assertEqual(main.waited(str(self.file), None, 60, clock), "done")
self.assertEqual(clock.now, 0)
def test_matches_no_part_of_a_half_written_first_line(self):
self.file.write_text("part")
clock = Clock(lambda: self.file.write_text("partial\n"))
self.assertEqual(main.waited(str(self.file), "p", 60, clock), "partial")
def test_reads_a_line_that_is_not_utf_8(self):
self.file.write_bytes(b"caf\xe9 passed\n")
self.assertEqual(main.waited(str(self.file), "passed", 60, Clock()), "caf\ufffd passed")