#NEWLINE# def test_use_labels( self ) : #NEWLINE# #INDENT# table1 . insert ( ) . execute ( { #NEWLINE# #INDENT# 'lowercase' : 1 , #NEWLINE# 'UPPERCASE' : 2 , #NEWLINE# 'MixedCase' : 3 , #NEWLINE# 'a123' : 4 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'lowercase' : 2 , #NEWLINE# 'UPPERCASE' : 2 , #NEWLINE# 'MixedCase' : 3 , #NEWLINE# 'a123' : 4 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'lowercase' : 4 , #NEWLINE# 'UPPERCASE' : 3 , #NEWLINE# 'MixedCase' : 2 , #NEWLINE# 'a123' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# table2 . insert ( ) . execute ( { #NEWLINE# #INDENT# 'd123' : 1 , #NEWLINE# 'u123' : 2 , #NEWLINE# 'MixedCase' : 3 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'd123' : 2 , #NEWLINE# 'u123' : 2 , #NEWLINE# 'MixedCase' : 3 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'd123' : 4 , #NEWLINE# 'u123' : 3 , #NEWLINE# 'MixedCase' : 2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# columns = [ table1 . c . lowercase , table1 . c . UPPERCASE , table1 . c . MixedCase , table1 . c . a123 ] #NEWLINE# result = select ( columns , use_labels = True ) . execute ( ) . fetchall ( ) #NEWLINE# assert ( result == [ ( 1 , 2 , 3 , 4 ) , ( 2 , 2 , 3 , 4 ) , ( 4 , 3 , 2 , 1 ) ] ) #NEWLINE# columns = [ table2 . c . d123 , table2 . c . u123 , table2 . c . MixedCase ] #NEWLINE# result = select ( columns , use_labels = True ) . execute ( ) . fetchall ( ) #NEWLINE# assert ( columns == [ ( 1 , 2 , 3 ) , ( 2 , 2 , 3 ) , ( 4 , 3 , 2 ) ] )