#NEWLINE# def test_select_union( self ) : #NEWLINE# #INDENT# u = select ( [ table1 . c . col1 , table1 . c . col2 , table1 . c . col3 , table1 . c . colx , null ( ) . label ( 'coly' ) ] ) . union ( select ( [ table2 . c . col1 , table2 . c . col2 , table2 . c . col3 , null ( ) . label ( 'colx' ) , table2 . c . coly ] ) ) . alias ( 'analias' ) #NEWLINE# s = select ( [ u ] ) #NEWLINE# s1 = table1 . select ( use_labels = True ) #NEWLINE# s2 = table2 . select ( use_labels = True ) #NEWLINE# assert ( s . corresponding_column ( s1 . c . table1_col2 ) is s . c . col2 ) #NEWLINE# assert ( s . corresponding_column ( s2 . c . table2_col2 ) is self . c . col2 )