def test_standalone_function(self): a = table("a", column("x")) a_stmt = select(a) stmt = select(cte(a_stmt)) self.assert_compile( stmt, "WITH anon_1 AS (SELECT a.x AS x FROM a) " "SELECT anon_1.x FROM anon_1", )
def test_standalone_function(self): a = table("a", column("x")) a_stmt = select([a]) stmt = select([cte(a_stmt)]) self.assert_compile( stmt, "WITH anon_1 AS (SELECT a.x AS x FROM a) " "SELECT anon_1.x FROM anon_1", )