From 192b9feda2f994956698eef28e8676b422bbf8ed Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 17 Nov 2026 02:50:20 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20the=20copie?= =?UTF-8?q?d-today=20test=20gives=20the=20file=20an=20mtime=20a=20month=20?= =?UTF-8?q?old,=20so=20it=20fails=20where=20age=20reads=20mtime=20alone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/compress_archives/test_compress_archives.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/compress_archives/test_compress_archives.py b/bin/compress_archives/test_compress_archives.py index ecfe7838..83a0fdc1 100644 --- a/bin/compress_archives/test_compress_archives.py +++ b/bin/compress_archives/test_compress_archives.py @@ -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):