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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user