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

Method test_join

test/sql/test_external_traversal.py:644–655  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

642 )
643
644 def test_join(self):
645 clause = t1.join(t2, t1.c.col2 == t2.c.col2)
646 c1 = str(clause)
647 assert str(clause) == str(CloningVisitor().traverse(clause))
648
649 class Vis(CloningVisitor):
650 def visit_binary(self, binary):
651 binary.right = t2.c.col3
652
653 clause2 = Vis().traverse(clause)
654 assert c1 == str(clause)
655 assert str(clause2) == str(t1.join(t2, t1.c.col2 == t2.c.col3))
656
657 def test_aliased_column_adapt(self):
658 t1.select()

Callers

nothing calls this directly

Calls 3

VisClass · 0.70
joinMethod · 0.45
traverseMethod · 0.45

Tested by

no test coverage detected