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

Method test_no_clone

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

Source from the content-addressed store, hash-verified

156 assert not struct.is_other(s2)
157
158 def test_no_clone(self):
159 struct = B(
160 A("expr1"), A("expr2"), B(A("expr1b"), A("expr2b")), A("expr3")
161 )
162
163 class Vis(ClauseVisitor):
164 def visit_a(self, a):
165 pass
166
167 def visit_b(self, b):
168 pass
169
170 vis = Vis()
171 s2 = vis.traverse(struct)
172 assert struct == s2
173 assert struct.is_other(s2)
174
175 def test_clone_anon_label(self):
176 from sqlalchemy.sql.elements import Grouping

Callers

nothing calls this directly

Calls 5

is_otherMethod · 0.95
BClass · 0.70
AClass · 0.70
VisClass · 0.70
traverseMethod · 0.45

Tested by

no test coverage detected