#NEWLINE# def test_subquery_in_filter_predicate( self ) : #NEWLINE# #INDENT# ( expr , expr2 ) = self . _case_subquery_in_filter_predicate ( ) #NEWLINE# result = to_sql ( expr ) #NEWLINE# expected = 'SELECT *\nFROM star1\nWHERE `f` > (\n  SELECT avg(`f`) AS `mean`\n  FROM star1\n)' #NEWLINE# assert ( result == expected ) #NEWLINE# result = to_sql ( expr2 ) #NEWLINE# expected = "SELECT *\nFROM star1\nWHERE `f` > (\n  SELECT avg(`f`) AS `mean`\n  FROM star1\n  WHERE `foo_id` = 'foo'\n)" #NEWLINE# assert ( result == expected )