|
@@ -719,13 +719,13 @@ class test_crontab_is_due(unittest.TestCase):
|
|
|
last_ran = self.now - timedelta(seconds=61)
|
|
|
due, remaining = EveryMinutePeriodic().is_due(last_ran)
|
|
|
self.assertTrue(due)
|
|
|
- self.assertAlmostEquals(remaining, self.next_minute, 2)
|
|
|
+ self.assertAlmostEquals(remaining, self.next_minute, 1)
|
|
|
|
|
|
def test_every_minute_execution_is_not_due(self):
|
|
|
last_ran = self.now - timedelta(seconds=self.now.second)
|
|
|
due, remaining = EveryMinutePeriodic().is_due(last_ran)
|
|
|
self.assertFalse(due)
|
|
|
- self.assertAlmostEquals(remaining, self.next_minute, 2)
|
|
|
+ self.assertAlmostEquals(remaining, self.next_minute, 1)
|
|
|
|
|
|
# 29th of May 2010 is a saturday
|
|
|
@patch_crontab_nowfun(HourlyPeriodic, datetime(2010, 5, 29, 10, 30))
|
|
@@ -733,7 +733,7 @@ class test_crontab_is_due(unittest.TestCase):
|
|
|
last_ran = self.now - timedelta(seconds=61)
|
|
|
due, remaining = EveryMinutePeriodic().is_due(last_ran)
|
|
|
self.assertTrue(due)
|
|
|
- self.assertAlmostEquals(remaining, self.next_minute, 2)
|
|
|
+ self.assertAlmostEquals(remaining, self.next_minute, 1)
|
|
|
|
|
|
# 30th of May 2010 is a sunday
|
|
|
@patch_crontab_nowfun(HourlyPeriodic, datetime(2010, 5, 30, 10, 30))
|
|
@@ -741,7 +741,7 @@ class test_crontab_is_due(unittest.TestCase):
|
|
|
last_ran = self.now - timedelta(seconds=61)
|
|
|
due, remaining = EveryMinutePeriodic().is_due(last_ran)
|
|
|
self.assertTrue(due)
|
|
|
- self.assertAlmostEquals(remaining, self.next_minute, 2)
|
|
|
+ self.assertAlmostEquals(remaining, self.next_minute, 1)
|
|
|
|
|
|
# 31st of May 2010 is a monday
|
|
|
@patch_crontab_nowfun(HourlyPeriodic, datetime(2010, 5, 31, 10, 30))
|
|
@@ -749,7 +749,7 @@ class test_crontab_is_due(unittest.TestCase):
|
|
|
last_ran = self.now - timedelta(seconds=61)
|
|
|
due, remaining = EveryMinutePeriodic().is_due(last_ran)
|
|
|
self.assertTrue(due)
|
|
|
- self.assertAlmostEquals(remaining, self.next_minute, 2)
|
|
|
+ self.assertAlmostEquals(remaining, self.next_minute, 1)
|
|
|
|
|
|
@patch_crontab_nowfun(HourlyPeriodic, datetime(2010, 5, 10, 10, 30))
|
|
|
def test_every_hour_execution_is_due(self):
|