#NEWLINE# def test_hybrid_descriptor_three( self ) : #NEWLINE# #INDENT# class Point ( object ) : #NEWLINE# #INDENT# def __init__( self , x , y ) : #NEWLINE# #INDENT# ( self . x , self . y ) = ( x , y ) #NEWLINE# #UNINDENT# @ hybrid_property #NEWLINE# def x_alone( self ) : #NEWLINE# #INDENT# return self . x #NEWLINE# #UNINDENT# #UNINDENT# self . _fixture ( Point ) #NEWLINE# alias = aliased ( Point ) #NEWLINE# eq_ ( str ( Point . x_alone ) , 'Point.x_alone' ) #NEWLINE# eq_ ( str ( alias . x_alone ) , 'AliasedClass_Point.x_alone' ) #NEWLINE# eq_ ( str ( Point . x . __clause_element__ ( ) ) , 'point.x' ) #NEWLINE# eq_ ( str ( Point . x_alone . __clause_element__ ( ) ) , 'point.x' ) #NEWLINE# eq_ ( str ( ( alias . x + 1 ) ) , 'point_1.x + :x_1' ) #NEWLINE# eq_ ( str ( ( alias . x_alone + 1 ) ) , 'point_1.x + :x_1' ) #NEWLINE# is_ ( Point . x_alone . __clause_element__ ( ) , Point . x . __clause_element__ ( ) ) #NEWLINE# eq_ ( str ( ( alias . x_alone == alias . x ) ) , 'point_1.x = point_1.x' ) #NEWLINE# a2 = aliased ( Point ) #NEWLINE# eq_ ( str ( ( a2 . x_alone == alias . x ) ) , 'point_1.x = point_2.x' ) #NEWLINE# sess = Session ( ) #NEWLINE# self . assert_compile ( sess . query ( alias ) . filter ( ( alias . x_alone > Point . x ) ) , 'SELECT point_1.id AS point_1_id, point_1.x AS point_1_x, point_1.y AS point_1_y FROM point AS point_1, point WHERE point_1.x > point.x' )