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

Method test_copy_cant

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

Source from the content-addressed store, hash-verified

80 self.assertEqual(c, [1])
81
82 def test_copy_cant(self):
83 class C(object):
84 def __getattribute__(self, name):
85 if name.startswith("__reduce"):
86 raise AttributeError(name)
87 return object.__getattribute__(self, name)
88 x = C()
89 self.assertRaises(copy.Error, copy.copy, x)
90
91 # Type-specific _copy_xxx() methods
92

Callers

nothing calls this directly

Calls 2

CClass · 0.70
assertRaisesMethod · 0.45

Tested by

no test coverage detected