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

Method test_pickling

Lib/test/datetimetester.py:1723–1730  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1721 self.assertEqual(t.tm_isdst, -1)
1722
1723 def test_pickling(self):
1724 args = 6, 7, 23
1725 orig = self.theclass(*args)
1726 for pickler, unpickler, proto in pickle_choices:
1727 green = pickler.dumps(orig, proto)
1728 derived = unpickler.loads(green)
1729 self.assertEqual(orig, derived)
1730 self.assertEqual(orig.__reduce__(), orig.__reduce_ex__(2))
1731
1732 def test_compat_unpickle(self):
1733 tests = [

Callers

nothing calls this directly

Calls 5

dumpsMethod · 0.45
loadsMethod · 0.45
assertEqualMethod · 0.45
__reduce__Method · 0.45
__reduce_ex__Method · 0.45

Tested by

no test coverage detected