MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_join_x1

Method test_join_x1

test/sql/test_query.py:1466–1474  ·  view source on GitHub ↗

Joins t1->t2.

(self)

Source from the content-addressed store, hash-verified

1464 eq_(found, sorted(expected))
1465
1466 def test_join_x1(self):
1467 """Joins t1->t2."""
1468 t1, t2, t3 = self.tables("t1", "t2", "t3")
1469
1470 for criteria in (t1.c.t1_id == t2.c.t1_id, t2.c.t1_id == t1.c.t1_id):
1471 expr = select(t1.c.t1_id, t2.c.t2_id).select_from(
1472 t1.join(t2, criteria)
1473 )
1474 self.assertRows(expr, [(10, 20), (11, 21)])
1475
1476 def test_join_x2(self):
1477 """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