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

Method test_clone

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

Source from the content-addressed store, hash-verified

139 assert not struct.is_other(struct3)
140
141 def test_clone(self):
142 struct = B(
143 A("expr1"), A("expr2"), B(A("expr1b"), A("expr2b")), A("expr3")
144 )
145
146 class Vis(CloningVisitor):
147 def visit_a(self, a):
148 pass
149
150 def visit_b(self, b):
151 pass
152
153 vis = Vis()
154 s2 = vis.traverse(struct)
155 assert struct == s2
156 assert not struct.is_other(s2)
157
158 def test_no_clone(self):
159 struct = B(

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