MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / test_subquery_accessors

Method test_subquery_accessors

test/sql/test_text.py:687–698  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

685 assert x not in mapping
686
687 def test_subquery_accessors(self):
688 t = self._xy_table_fixture()
689
690 s = text("SELECT x from t").columns(t.c.x)
691
692 self.assert_compile(
693 select(s.scalar_subquery()), "SELECT (SELECT x from t) AS anon_1"
694 )
695 self.assert_compile(
696 select(s.subquery()),
697 "SELECT anon_1.x FROM (SELECT x from t) AS anon_1",
698 )
699
700 def test_select_label_alt_name_table_alias_column(self):
701 t = self._xy_table_fixture()

Callers

nothing calls this directly

Calls 7

_xy_table_fixtureMethod · 0.95
textFunction · 0.90
selectFunction · 0.90
assert_compileMethod · 0.80
columnsMethod · 0.45
scalar_subqueryMethod · 0.45
subqueryMethod · 0.45

Tested by

no test coverage detected