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

Method test_in_cte_implicit

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

Source from the content-addressed store, hash-verified

4611 )
4612
4613 def test_in_cte_implicit(self):
4614 t = table("t", column("x"))
4615
4616 stmt = select(t.c.x).cte()
4617
4618 with expect_warnings(
4619 r"Coercing CTE object into a select\(\) for use in "
4620 r"IN\(\); please pass a select\(\) construct explicitly",
4621 ):
4622 s2 = select(column("q").in_(stmt))
4623
4624 self.assert_compile(
4625 s2,
4626 "WITH anon_2 AS (SELECT t.x AS x FROM t) "
4627 "SELECT q IN (SELECT anon_2.x FROM anon_2) AS anon_1",
4628 )
4629
4630 def test_in_cte_explicit(self):
4631 t = table("t", column("x"))

Callers

nothing calls this directly

Calls 7

tableFunction · 0.90
columnFunction · 0.90
expect_warningsFunction · 0.90
selectFunction · 0.85
assert_compileMethod · 0.80
cteMethod · 0.45
in_Method · 0.45

Tested by

no test coverage detected