MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_select_in

Method test_select_in

test/sql/test_compiler.py:4913–4923  ·  view source on GitHub ↗
(self, scalar_subquery)

Source from the content-addressed store, hash-verified

4911
4912 @testing.variation("scalar_subquery", [True, False])
4913 def test_select_in(self, scalar_subquery):
4914 stmt = select(table2.c.otherid, table2.c.othername)
4915
4916 if scalar_subquery:
4917 stmt = stmt.scalar_subquery()
4918
4919 self.assert_compile(
4920 tuple_(table1.c.myid, table1.c.name).in_(stmt),
4921 "(mytable.myid, mytable.name) IN (SELECT "
4922 "myothertable.otherid, myothertable.othername FROM myothertable)",
4923 )
4924
4925 def test_expanding_parameter(self):
4926 self.assert_compile(

Callers

nothing calls this directly

Calls 5

selectFunction · 0.90
tuple_Function · 0.90
assert_compileMethod · 0.80
scalar_subqueryMethod · 0.45
in_Method · 0.45

Tested by

no test coverage detected