MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_copy_inst_copy

Method test_copy_inst_copy

Lib/test/test_copy.py:171–180  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

169 self.assertEqual(copy.copy(x), x)
170
171 def test_copy_inst_copy(self):
172 class C:
173 def __init__(self, foo):
174 self.foo = foo
175 def __copy__(self):
176 return C(self.foo)
177 def __eq__(self, other):
178 return self.foo == other.foo
179 x = C(42)
180 self.assertEqual(copy.copy(x), x)
181
182 def test_copy_inst_getinitargs(self):
183 class C:

Callers

nothing calls this directly

Calls 3

CClass · 0.70
assertEqualMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected