#NEWLINE# def test_subqueryload( self ) : #NEWLINE# #INDENT# Subparent = self . classes . Subparent #NEWLINE# sess = create_session ( ) #NEWLINE# def go( ) : #NEWLINE# #INDENT# eq_ ( sess . query ( Subparent ) . options ( subqueryload ( Subparent . children ) ) . all ( ) , [ p1 , p2 ] ) #NEWLINE# #UNINDENT# self . assert_sql_count ( testing . db , go , 2 ) #NEWLINE# sess . expunge_all ( ) #NEWLINE# def go( ) : #NEWLINE# #INDENT# eq_ ( sess . query ( Subparent ) . options ( subqueryload ( 'children' ) ) . all ( ) , [ p1 , p2 ] ) #NEWLINE# #UNINDENT# self . assert_sql_count ( testing . db , go , 2 )