#NEWLINE# def test_from_list_with_columns( self ) : #NEWLINE# #INDENT# table1 = table ( 't1' , column ( 'a' ) ) #NEWLINE# table2 = table ( 't2' , column ( 'b' ) ) #NEWLINE# s1 = select ( [ table1 . c . a , table2 . c . b ] ) #NEWLINE# self . assert_compile ( table2 , 'SELECT t1.a, t2.b FROM t1, t2' ) #NEWLINE# s2 = s1 . with_only_columns ( [ table2 . c . b ] ) #NEWLINE# self . assert_compile ( s2 , 'SELECT t2.b FROM t2' ) #NEWLINE# s3 = sql_util . ClauseAdapter ( table1 ) . traverse ( s1 ) #NEWLINE# self . assert_compile ( s3 , 'SELECT t1.a, t2.b FROM t1, t2' ) #NEWLINE# s4 = s3 . with_only_columns ( [ table2 . c . b ] ) #NEWLINE# self . assert_compile ( s4 , 'SELECT t2.b FROM t2' )