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

Method test_pickle

Lib/test/test_collections.py:569–578  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

567 self.assertEqual(b._fields, tuple(names))
568
569 def test_pickle(self):
570 p = TestNT(x=10, y=20, z=30)
571 for module in (pickle,):
572 loads = getattr(module, 'loads')
573 dumps = getattr(module, 'dumps')
574 for protocol in range(-1, module.HIGHEST_PROTOCOL + 1):
575 q = loads(dumps(p, protocol))
576 self.assertEqual(p, q)
577 self.assertEqual(p._fields, q._fields)
578 self.assertNotIn(b'OrderedDict', dumps(p, protocol))
579
580 def test_copy(self):
581 p = TestNT(x=10, y=20, z=30)

Callers

nothing calls this directly

Calls 4

assertNotInMethod · 0.80
loadsFunction · 0.50
dumpsFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected