#NEWLINE# def testSeqLikeOps( self ) : #NEWLINE# #INDENT# seq = [ ] #NEWLINE# ds = bards . BarDataSeries ( ) #NEWLINE# for i in range ( 10 ) : #NEWLINE# #INDENT# bar_ = bar . BasicBar ( ( datetime . datetime . now ( ) + datetime . timedelta ( seconds = i ) ) , 2 , 4 , 1 , 3 , 10 , 3 , bar . Frequency . SECOND ) #NEWLINE# ds . append ( bar_ ) #NEWLINE# seq . append ( bar_ ) #NEWLINE# #UNINDENT# self . assertEqual ( ds [ ( - 1 ) ] , seq [ ( - 1 ) ] ) #NEWLINE# self . assertEqual ( ds [ ( - 2 ) ] , seq [ ( - 2 ) ] ) #NEWLINE# self . assertEqual ( ds [ 0 ] , seq [ 0 ] ) #NEWLINE# self . assertEqual ( ds [ 1 ] , seq [ 1 ] ) #NEWLINE# self . assertEqual ( ds [ ( - 2 ) : ] [ ( - 1 ) ] , seq [ ( - 2 ) : ] [ ( - 1 ) ] )