MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_pickling

Method test_pickling

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

Source from the content-addressed store, hash-verified

3974 self.assertTrue(self.theclass.max > self.theclass.min)
3975
3976 def test_pickling(self):
3977 args = 20, 59, 16, 64**2
3978 orig = self.theclass(*args)
3979 for pickler, unpickler, proto in pickle_choices:
3980 green = pickler.dumps(orig, proto)
3981 derived = unpickler.loads(green)
3982 self.assertEqual(orig, derived)
3983 self.assertEqual(orig.__reduce__(), orig.__reduce_ex__(2))
3984
3985 def test_pickling_subclass_time(self):
3986 args = 20, 59, 16, 64**2

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