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

Method test_in_table_alias

test/sql/test_operators.py:4602–4611  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4600 self.assert_compile(column("q").in_(t), "q IN (SELECT t.x FROM t)")
4601
4602 def test_in_table_alias(self):
4603 t = table("t", column("x"))
4604
4605 with expect_warnings(
4606 r"Coercing Alias object into a select\(\) for use in "
4607 r"IN\(\); please pass a select\(\) construct explicitly",
4608 ):
4609 self.assert_compile(
4610 column("q").in_(t.alias()), "q IN (SELECT t_1.x FROM t AS t_1)"
4611 )
4612
4613 def test_in_cte_implicit(self):
4614 t = table("t", column("x"))

Callers

nothing calls this directly

Calls 6

tableFunction · 0.90
columnFunction · 0.90
expect_warningsFunction · 0.90
assert_compileMethod · 0.80
in_Method · 0.45
aliasMethod · 0.45

Tested by

no test coverage detected