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

Method test_deepcopy

Lib/test/test_functools.py:354–363  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

352 self.assertIs(f_copy.keywords, f.keywords)
353
354 def test_deepcopy(self):
355 f = self.partial(signature, ['asdf'], bar=[True])
356 f.attr = []
357 f_copy = copy.deepcopy(f)
358 self.assertEqual(signature(f_copy), signature(f))
359 self.assertIsNot(f_copy.attr, f.attr)
360 self.assertIsNot(f_copy.args, f.args)
361 self.assertIsNot(f_copy.args[0], f.args[0])
362 self.assertIsNot(f_copy.keywords, f.keywords)
363 self.assertIsNot(f_copy.keywords['bar'], f.keywords['bar'])
364
365 def test_setstate(self):
366 f = self.partial(signature)

Callers

nothing calls this directly

Calls 4

partialMethod · 0.80
assertIsNotMethod · 0.80
signatureFunction · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected