#NEWLINE# def testSimple( self ) : #NEWLINE# #INDENT# ratio = self . __buildRatio ( [ 1 , 2 , 1 ] ) #NEWLINE# self . assertEqual ( ratio [ 0 ] , None ) #NEWLINE# self . assertEqual ( ratio [ 1 ] , 1 ) #NEWLINE# self . assertEqual ( ratio [ 2 ] , ( - 0.5 ) ) #NEWLINE# self . assertEqual ( ratio [ ( - 1 ) ] , ( - 0.5 ) ) #NEWLINE# with self . assertRaises ( IndexError ) : #NEWLINE# #INDENT# ratio [ 3 ] #NEWLINE# #UNINDENT# self . assertEqual ( ratio [ ( - 2 ) ] , ratio [ 1 ] ) #NEWLINE# self . assertEqual ( ratio [ ( - 1 ) ] , ratio [ 2 ] ) #NEWLINE# self . assertEqual ( len ( ratio . getDateTimes ( ) ) , 3 ) #NEWLINE# for i in range ( len ( ratio ) ) : #NEWLINE# #INDENT# self . assertEqual ( ratio . getDateTimes ( ) [ i ] , None )