#NEWLINE# def testPartiallyAligned_Recursive( self ) : #NEWLINE# #INDENT# size = 20 #NEWLINE# commonDateTimes = [ ] #NEWLINE# ds1 = dataseries . SequenceDataSeries ( ) #NEWLINE# ds2 = dataseries . SequenceDataSeries ( ) #NEWLINE# ( ads1 , ads2 ) = aligned . datetime_aligned ( ds1 , ds2 ) #NEWLINE# ( ads1 , ads2 ) = aligned . datetime_aligned ( ads1 , ads2 ) #NEWLINE# now = datetime . datetime . now ( ) #NEWLINE# for i in range ( size ) : #NEWLINE# #INDENT# if ( ( i % 3 ) == 0 ) : #NEWLINE# #INDENT# commonDateTimes . append ( ( now + datetime . timedelta ( seconds = i ) ) ) #NEWLINE# ds1 . appendWithDateTime ( ( now + datetime . timedelta ( seconds = i ) ) , i ) #NEWLINE# ds2 . appendWithDateTime ( ( now + datetime . timedelta ( seconds = i ) ) , i ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( i % 2 ) == 0 ) : #NEWLINE# #INDENT# ds1 . appendWithDateTime ( ( now + datetime . timedelta ( seconds = i ) ) , i ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ds2 . appendWithDateTime ( ( now + datetime . timedelta ( seconds = i ) ) , i ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . assertEqual ( len ( ads1 ) , len ( ads2 ) ) #NEWLINE# self . assertEqual ( ads1 [ : ] , ads2 [ : ] ) #NEWLINE# self . assertEqual ( ads1 . getDateTimes ( ) , commonDateTimes ) #NEWLINE# self . assertEqual ( ads2 . getDateTimes ( ) , commonDateTimes )