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

Method test_copy_reduce

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

Source from the content-addressed store, hash-verified

69 self.assertEqual(c, [1])
70
71 def test_copy_reduce(self):
72 class C(object):
73 def __reduce__(self):
74 c.append(1)
75 return ""
76 c = []
77 x = C()
78 y = copy.copy(x)
79 self.assertIs(y, x)
80 self.assertEqual(c, [1])
81
82 def test_copy_cant(self):
83 class C(object):

Callers

nothing calls this directly

Calls 4

CClass · 0.70
copyMethod · 0.45
assertIsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected