Answer stability round 2: 0 🔴, 1 🟡; test that an unreadable project is skipped and named
This commit is contained in:
@@ -201,7 +201,11 @@ class Archive(unittest.TestCase):
|
|||||||
def test_skips_a_chunk_it_cannot_read_and_names_it(self):
|
def test_skips_a_chunk_it_cannot_read_and_names_it(self):
|
||||||
self.chunk("log", "c1", stamped("2026-10-14T10:00:00Z", outcomes.finished(LOW_ROUTE, "m")), [])
|
self.chunk("log", "c1", stamped("2026-10-14T10:00:00Z", outcomes.finished(LOW_ROUTE, "m")), [])
|
||||||
(self.root / "log" / "c1" / "copy.jsonl").unlink()
|
(self.root / "log" / "c1" / "copy.jsonl").unlink()
|
||||||
self.assertEqual(archive.measure_archive(self.root, "/h", ""), archive.Measured([], ("log/c1",)))
|
self.chunk("other", "c2", stamped("2026-10-14T10:00:00Z", outcomes.finished(LOW_ROUTE, "m")), [message("m1", "2026-10-14T09:00:00Z")])
|
||||||
|
self.chunk("broken", "c3", "", [])
|
||||||
|
(self.root / "broken" / "c3" / "copy.outcomes.md").write_bytes(b"\xff")
|
||||||
|
found = archive.measure_archive(self.root, "/h", "")
|
||||||
|
self.assertEqual((len(found.chunks), found.skipped), (1, ("broken", "log/c1")))
|
||||||
self.assertIn("## Chunks skipped, unreadable\n\n- log/c1\n", render(totals([], ("log/c1",)), [], "2026-10-15T00:00:00Z", 20, ""))
|
self.assertIn("## Chunks skipped, unreadable\n\n- log/c1\n", render(totals([], ("log/c1",)), [], "2026-10-15T00:00:00Z", 20, ""))
|
||||||
|
|
||||||
def test_keeps_the_figures_and_reads_back_the_cycle_they_were_measured_at(self):
|
def test_keeps_the_figures_and_reads_back_the_cycle_they_were_measured_at(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user