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

Method test_pickle

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

Source from the content-addressed store, hash-verified

335 f.__setstate__((capture, (), {}, {}))
336
337 def test_pickle(self):
338 with replaced_module('functools', self.module):
339 f = self.partial(signature, ['asdf'], bar=[True])
340 f.attr = []
341 for proto in range(pickle.HIGHEST_PROTOCOL + 1):
342 f_copy = pickle.loads(pickle.dumps(f, proto))
343 self.assertEqual(signature(f_copy), signature(f))
344
345 def test_copy(self):
346 f = self.partial(signature, ['asdf'], bar=[True])

Callers

nothing calls this directly

Calls 6

partialMethod · 0.80
replaced_moduleFunction · 0.70
signatureFunction · 0.70
loadsMethod · 0.45
dumpsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected