MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_join_x2

Method test_join_x2

test/sql/test_query.py:1476–1484  ·  view source on GitHub ↗

Joins t1->t2->t3.

(self)

Source from the content-addressed store, hash-verified

1474 self.assertRows(expr, [(10, 20), (11, 21)])
1475
1476 def test_join_x2(self):
1477 """Joins t1->t2->t3."""
1478 t1, t2, t3 = self.tables("t1", "t2", "t3")
1479
1480 for criteria in (t1.c.t1_id == t2.c.t1_id, t2.c.t1_id == t1.c.t1_id):
1481 expr = select(t1.c.t1_id, t2.c.t2_id).select_from(
1482 t1.join(t2, criteria)
1483 )
1484 self.assertRows(expr, [(10, 20), (11, 21)])
1485
1486 def test_outerjoin_x1(self):
1487 """Outer joins t1->t2."""

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