#NEWLINE# def test_reduce_only_synonym_fk( self ) : #NEWLINE# #INDENT# m = MetaData ( ) #NEWLINE# t1 = Table ( 't1' , m , Column ( 'x' , Integer , primary_key = True ) , Column ( 'y' , Integer ) ) #NEWLINE# t2 = Table ( 't2' , m , Column ( 'x' , Integer , ForeignKey ( 't1.x' ) ) , Column ( 'q' , Integer , ForeignKey ( 't1.y' ) ) ) #NEWLINE# s1 = select ( [ t1 , t2 ] ) #NEWLINE# s1 = s1 . reduce_columns ( only_synonyms = True ) #NEWLINE# eq_ ( set ( s1 . c ) , set ( [ s1 . c . x , t2 . c . y , s1 . c . q ] ) )