MCPcopy Index your code
hub / github.com/python/cpython / C

Class C

Lib/test/test_copy.py:32–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31 def test_copy_copy(self):
32 class C(object):
33 def __init__(self, foo):
34 self.foo = foo
35 def __copy__(self):
36 return C(self.foo)
37 x = C(42)
38 y = copy.copy(x)
39 self.assertEqual(y.__class__, x.__class__)

Callers 15

__copy__Method · 0.70
test_copy_copyMethod · 0.70
test_copy_registryMethod · 0.70
test_copy_reduce_exMethod · 0.70
test_copy_reduceMethod · 0.70
test_copy_cantMethod · 0.70
test_copy_inst_copyMethod · 0.70

Calls

no outgoing calls

Tested by 15

__copy__Method · 0.56
test_copy_copyMethod · 0.56
test_copy_registryMethod · 0.56
test_copy_reduce_exMethod · 0.56
test_copy_reduceMethod · 0.56
test_copy_cantMethod · 0.56
test_copy_inst_copyMethod · 0.56