From bd257f3004e9dd7fb1a28ab84caead5112db5a1d Mon Sep 17 00:00:00 2001 From: Michael Krayer Date: Fri, 22 May 2020 11:06:31 +0200 Subject: [PATCH] fixed test: time.time() resolution too low --- test_archivemail | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_archivemail b/test_archivemail index ed033e2..dd68318 100755 --- a/test_archivemail +++ b/test_archivemail @@ -515,8 +515,9 @@ class TestIsTooOld(unittest.TestCase): def testJustOld(self): """with max_days=1, should be true for these dates >= 1 day""" + ctime = time.time() for minutes in range(0, 61): - time_msg = time.time() - (25 * 60 * 60) + (minutes * 60) + time_msg = ctime - (25 * 60 * 60) + (minutes * 60) assert archivemail.is_older_than_days(time_message=time_msg, max_days=1)