#NEWLINE# @ testing . emits_warning ( "Column 'col1'" ) #NEWLINE# def test_union_dupe_keys( self ) : #NEWLINE# #INDENT# s1 = select ( [ table1 . c . col1 , table1 . c . col2 , table2 . c . col1 ] ) #NEWLINE# s2 = select ( [ table2 . c . col1 , table2 . c . col2 , table2 . c . col3 ] ) #NEWLINE# u1 = union ( s1 , s2 ) #NEWLINE# assert ( u1 . corresponding_column ( s1 . c . _all_columns [ 0 ] ) is u1 . c . _all_columns [ 0 ] ) #NEWLINE# assert ( u1 . corresponding_column ( s2 . c . col1 ) is u1 . c . _all_columns [ 0 ] ) #NEWLINE# assert ( u1 . corresponding_column ( s1 . c . col2 ) is u1 . c . col2 ) #NEWLINE# assert ( u1 . corresponding_column ( s2 . c . col2 ) is u1 . c . col2 ) #NEWLINE# assert ( u1 . corresponding_column ( s2 . c . col3 ) is u1 . c . _all_columns [ 2 ] ) #NEWLINE# assert ( u1 . corresponding_column ( table2 . c . col1 ) is u1 . c . _all_columns [ 2 ] ) #NEWLINE# assert ( u1 . corresponding_column ( table2 . c . col3 ) is u1 . c . _all_columns [ 2 ] )