MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_in_table_alias

Method test_in_table_alias

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

Source from the content-addressed store, hash-verified

4934 self.assert_compile(column("q").in_(t), "q IN (SELECT t.x FROM t)")
4935
4936 def test_in_table_alias(self):
4937 t = table("t", column("x"))
4938
4939 with expect_warnings(
4940 r"Coercing Alias object into a select\(\) for use in "
4941 r"IN\(\); please pass a select\(\) construct explicitly",
4942 ):
4943 self.assert_compile(
4944 column("q").in_(t.alias()), "q IN (SELECT t_1.x FROM t AS t_1)"
4945 )
4946
4947 def test_in_cte_implicit(self):
4948 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