Answer stability round 2: 0 🔴, 1 🟡 (0 misread); the copied-today test gives the file an mtime a month old, so it fails where age reads mtime alone

This commit is contained in:
2026-11-17 02:50:20 +01:00
parent 74d69fedfb
commit 192b9feda2
@@ -75,7 +75,9 @@ class Main(unittest.TestCase):
self.assertTrue((self.archive / "b.jsonl").is_file())
def test_keeps_a_file_copied_today_with_its_old_times_plain(self):
self.assertEqual(self.run_main(now=time.time()), (0, "Compressed 0 files.\n", ""))
now = time.time()
os.utime(self.archive / "a.jsonl", (now - 31 * DAY, now - 31 * DAY))
self.assertEqual(self.run_main(now=now), (0, "Compressed 0 files.\n", ""))
self.assertTrue((self.archive / "a.jsonl").is_file())
def test_measures_the_30_days_from_the_clock_by_default(self):