MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_subq

Method test_subq

test/sql/test_operators.py:5187–5196  ·  view source on GitHub ↗
(self, t_fixture, any_all_operators)

Source from the content-addressed store, hash-verified

5185 )
5186
5187 def test_subq(self, t_fixture, any_all_operators):
5188 t = t_fixture
5189 op, fn = any_all_operators
5190
5191 self.assert_compile(
5192 5 == fn(select(t.c.data).where(t.c.data < 10).scalar_subquery()),
5193 f":param_1 = {op} (SELECT tab1.data "
5194 "FROM tab1 WHERE tab1.data < :data_1)",
5195 checkparams={"data_1": 10, "param_1": 5},
5196 )
5197
5198 def test_scalar_values(self, t_fixture, any_all_operators):
5199 t = t_fixture

Callers

nothing calls this directly

Calls 4

selectFunction · 0.85
assert_compileMethod · 0.80
scalar_subqueryMethod · 0.45
whereMethod · 0.45

Tested by

no test coverage detected