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

Method test_outerjoin_x1

test/sql/test_query.py:1554–1562  ·  view source on GitHub ↗

Outer joins t1->t2.

(self)

Source from the content-addressed store, hash-verified

1552 self.assertRows(expr, [(10, 20), (11, 21)])
1553
1554 def test_outerjoin_x1(self):
1555 """Outer joins t1->t2."""
1556 t1, t2, t3 = self.tables("t1", "t2", "t3")
1557
1558 for criteria in (t2.c.t2_id == t3.c.t2_id, t3.c.t2_id == t2.c.t2_id):
1559 expr = select(t1.c.t1_id, t2.c.t2_id).select_from(
1560 t1.join(t2).join(t3, criteria)
1561 )
1562 self.assertRows(expr, [(10, 20)])
1563
1564 def test_outerjoin_x2(self):
1565 """Outer joins t1->t2,t3."""

Callers

nothing calls this directly

Calls 4

assertRowsMethod · 0.95
selectFunction · 0.90
select_fromMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected