MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_select_in

Method test_select_in

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

Source from the content-addressed store, hash-verified

4706
4707 @testing.variation("scalar_subquery", [True, False])
4708 def test_select_in(self, scalar_subquery):
4709 stmt = select(table2.c.otherid, table2.c.othername)
4710
4711 if scalar_subquery:
4712 stmt = stmt.scalar_subquery()
4713
4714 self.assert_compile(
4715 tuple_(table1.c.myid, table1.c.name).in_(stmt),
4716 "(mytable.myid, mytable.name) IN (SELECT "
4717 "myothertable.otherid, myothertable.othername FROM myothertable)",
4718 )
4719
4720 def test_expanding_parameter(self):
4721 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