#NEWLINE# def test_crontab_hour( self ) : #NEWLINE# #INDENT# valids = [ 0 , 1 , 4 , 6 , 8 , 9 , 12 , 18 ] #NEWLINE# validate_h = crontab ( hour = '8-9,*/6,1,4' ) #NEWLINE# for x in range ( 24 ) : #NEWLINE# #INDENT# res = validate_h ( datetime . datetime ( 2011 , 1 , 1 , x ) ) #NEWLINE# self . assertEqual ( res , ( x in valids ) ) #NEWLINE# #UNINDENT# edge = crontab ( hour = 0 ) #NEWLINE# self . assertTrue ( edge ( datetime . datetime ( 2011 , 1 , 1 , 0 , 0 ) ) ) #NEWLINE# self . assertFalse ( edge ( datetime . datetime ( 2011 , 1 , 1 , 12 , 0 ) ) )