#NEWLINE# def test_merge_mixed_names( self ) : #NEWLINE# #INDENT# table_a = Table ( self . rows , table_a . column_names , self . column_types ) #NEWLINE# column_names = [ 'two' , 'one' , 'four' ] #NEWLINE# table_b = Table ( self . rows , column_names , self . column_types ) #NEWLINE# table_c = Table . merge ( [ table_a , table_b ] ) #NEWLINE# self . assertIsNot ( table_c , table_a ) #NEWLINE# self . assertIsNot ( table_c , table_b ) #NEWLINE# self . assertColumnNames ( table_c , [ 'one' , 'two' , 'three' , 'four' ] ) #NEWLINE# self . assertColumnTypes ( table_c , [ Number , Number , Text , Text ] ) #NEWLINE# self . assertSequenceEqual ( table_c . rows [ 0 ] , [ 1 , 4 , 'a' , None ] ) #NEWLINE# self . assertSequenceEqual ( table_c . rows [ 3 ] , [ 4 , 1 , None , 'a' ] ) #NEWLINE# for row in table_c . rows : #NEWLINE# #INDENT# self . assertSequenceEqual ( row . keys ( ) , [ 'one' , 'two' , 'three' , 'four' ] )