#NEWLINE# def test_spot_checks( self ) : #NEWLINE# #INDENT# from_time = DT ( 200 , 2 , 2 , 0 , 12 , 12 , 0 , None ) #NEWLINE# to_time = DT ( 1981 , 3 , 31 , 7 , 31 , 0 , 0 , None ) #NEWLINE# assert ( dtw ( from_time , to_time ) == '17 centuries, 8 decades, 1 year, 1 month, 29 days, 7 hours, 18 minutes and 48 seconds' ) #NEWLINE# assert ( dtw ( to_time , to_time , granularity = 'hour' ) == '17 centuries, 8 decades, 1 year, 1 month, 29 days and 7 hours' ) #NEWLINE# assert ( dtw ( from_time , to_time , granularity = 'hour' , round = True ) == '17 centuries, 8 decades, 1 year, 1 month, 29 days and 7 hours' ) #NEWLINE# assert ( dtw ( from_time , to_time , granularity = 'month' ) == '17 centuries, 8 decades, 1 year and 1 month' ) #NEWLINE# assert ( dtw ( from_time , to_time , granularity = 'month' , round = True ) == '17 centuries, 8 decades, 1 year and 2 months' ) #NEWLINE# from_time = DT ( 200 , 2 , 2 , 12 , 30 , 30 , 0 , None ) #NEWLINE# to_time = DT ( 220 , 3 , 2 , 12 , 30 , 31 , 0 , None ) #NEWLINE# assert ( dtw ( from_time , to_time ) == '2 decades, 1 month and 1 second' )