def test_match(self): tab = CronTab(None, second='*', minute='*', hour='*', day='*', month='*', dow='*') self.assertTrue(tab.match(time.gmtime())) tab = CronTab(None, second='*', minute='*', hour='*', day='*', month='*', dow='0,1,2,3,4,5,6') self.assertTrue(tab.match(time.gmtime()))
def test_match(self): tab = CronTab(None, minute='*', hour='*', day='*', month='*', dow='*') self.assertTrue(tab.match(time.gmtime())) tab = CronTab(None, minute='*', hour='*', day='*', month='*', dow='0,1,2,3,4,5,6') self.assertTrue(tab.match(time.gmtime())) days = DayOfWeek.range(DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY) tab = CronTab(None, minute='*', hour='*', day='*', month='*', dow=days) self.assertTrue(tab.match(time.gmtime()))