MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_column_subquery_plain

Method test_column_subquery_plain

test/sql/test_selectable.py:4023–4033  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4021 )
4022
4023 def test_column_subquery_plain(self):
4024 t = self._fixture()
4025 s1 = select(t.c.x).where(t.c.x > 5).scalar_subquery()
4026 s2 = select(s1)
4027 mapping = self._mapping(s2)
4028 assert t.c.x not in mapping
4029 assert s1 in mapping
4030 eq_(
4031 [type(entry[-1]) for entry in s2.compile()._result_columns],
4032 [Integer],
4033 )
4034
4035 def test_unary_boolean(self):
4036 s1 = select(not_(True)).set_label_style(LABEL_STYLE_TABLENAME_PLUS_COL)

Callers

nothing calls this directly

Calls 7

_fixtureMethod · 0.95
_mappingMethod · 0.95
selectFunction · 0.90
eq_Function · 0.90
scalar_subqueryMethod · 0.45
whereMethod · 0.45
compileMethod · 0.45

Tested by

no test coverage detected