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
+13
View File
@@ -26,6 +26,19 @@ class Compress(unittest.TestCase):
self.assertEqual(packed.read_bytes(), gzip.compress(b'{"a": 1}\n', mtime=0))
self.assertEqual(packed.stat().st_mtime, 2000)
def test_asks_for_a_gzip_whose_header_holds_no_time_whatever_the_packer_would_write_unasked(self):
with tempfile.TemporaryDirectory() as root:
plain = pathlib.Path(root, "t.jsonl")
plain.write_bytes(b"a\n")
asked = []
def pack(data, **kwargs):
asked.append(kwargs)
return gzip.compress(data, **kwargs)
self.assertIsNone(compress(plain, pack=pack))
self.assertEqual(asked, [{"mtime": 0}])
def test_syncs_the_gzip_and_its_folder_before_removing_the_file(self):
with tempfile.TemporaryDirectory() as root:
plain = pathlib.Path(root, "t.jsonl")