def testComplexEntry(self): # Test a set with star/step, single value, range, and a range step self.assertEqual(parseCronEntry('*/5,1,12-18,22-28/3', 1, 30), [1, 5, 10] + range(12, 19) + [20, 24, 25, 27, 30])
def testSetOfSinglesEntry(self): # Test a set of single values self.assertEqual(parseCronEntry('1,3,5', 1, 12), range(1, 6, 2))
def testSetOfRangesEntry(self): # Test on a set of ranges self.assertEqual(parseCronEntry('1-3,6-9', 1, 12), range(1, 4) + range(6, 10))
def testRangeStepEntry(self): # Test a range step starting on the interval self.assertEqual(parseCronEntry('3-9/3', 0, 12), range(3, 10, 3)) # Test a range step not starting on the interval self.assertEqual(parseCronEntry('2-10/3', 1, 12), range(3, 11, 3))
def testStarStepEntry(self): # Test a star step starting at on the interval self.assertEqual(parseCronEntry('*/3', 0, 12), range(0, 13, 3)) # Test a star step not starting on the interval self.assertEqual(parseCronEntry('*/3', 1, 12), range(3, 13, 3))
def testRangeEntry(self): # Test a range self.assertEqual(parseCronEntry('3-9', 0, 12), range(3, 10))
def testStarEntry(self): # Test star self.assertEqual(parseCronEntry('*', 0, 12), range(0, 13))
def testSingleEntry(self): # Test simple single entry self.assertEqual(parseCronEntry('0', 0, 12), [0])