def test_greater_hour_lesser_minute(self): sched = schedule.ByTimeOfDay(3, 15) tt = parse_time("2020-08-27 05:10:00") next_tt = parse_time("2020-08-28 03:15:00") self.assertEqual(sched.check(tt), False) self.assertEqual(sched.next(tt), next_tt)
def test_same_hour_same_minute(self): sched = schedule.ByTimeOfDay(3, 15) tt = parse_time("2020-08-27 03:15:00") next_tt = parse_time("2020-08-28 03:15:00") self.assertEqual(sched.check(tt), True) self.assertEqual(sched.next(tt), next_tt)
def test_str(self): sched = schedule.ByTimeOfDay(3, 15) str(sched)