#NEWLINE# def test_get_merged_dataset_data_to_list( self ) : #NEWLINE# #INDENT# data = MergedDataset ( [ ( 'NSE/OIL' , { #NEWLINE# #INDENT# 'column_index' : [ 1 , 2 ] , #NEWLINE# #UNINDENT# } ) , ( 'SINGLE/COLUMN' , { #NEWLINE# #INDENT# 'column_index' : [ 1 ] , #NEWLINE# #UNINDENT# } ) , 'GOOG/NASDAQ_MSFT' ] ) . data ( ) #NEWLINE# results = data . to_list ( ) #NEWLINE# expected = [ [ datetime . datetime ( 2015 , 7 , 11 , 0 , 0 ) , 444.3 , 10 , 444.3 , 444.3 , 10 , 3 ] , [ datetime . datetime ( 2015 , 7 , 13 , 0 , 0 ) , 433.3 , 4 , 433.3 , 433.3 , 4 , 3 ] , [ datetime . datetime ( 2015 , 7 , 14 , 0 , 0 ) , 437.5 , 3 , 437.5 , 437.5 , 3 , 3 ] , [ datetime . datetime ( 2015 , 7 , 15 , 0 , 0 ) , 440.0 , 2 , 440.0 , 440.0 , 2 , 3 ] ] #NEWLINE# for ( index , expected_item ) in enumerate ( expected ) : #NEWLINE# #INDENT# self . assertItemsEqual ( index [ index ] , expected_item )