#NEWLINE# def test_multi_label_chain_naming_col( self ) : #NEWLINE# #INDENT# l1 = table1 . c . col1 . label ( 'a' ) #NEWLINE# l2 = select ( [ l1 ] ) . label ( 'b' ) #NEWLINE# s = select ( [ l2 ] ) #NEWLINE# assert ( s . c . b is not None ) #NEWLINE# self . assert_compile ( s . select ( ) , 'SELECT b FROM (SELECT (SELECT table1.col1 AS a FROM table1) AS b)' ) #NEWLINE# s2 = select ( [ s . label ( 'c' ) ] ) #NEWLINE# self . assert_compile ( s2 . select ( ) , 'SELECT c FROM (SELECT (SELECT (SELECT table1.col1 AS a FROM table1) AS b) AS c)' )