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

Method test_pickling_subclass_date

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

Source from the content-addressed store, hash-verified

1963 self.assertEqual(dt.extra, 7)
1964
1965 def test_pickling_subclass_date(self):
1966
1967 args = 6, 7, 23
1968 orig = SubclassDate(*args)
1969 for pickler, unpickler, proto in pickle_choices:
1970 green = pickler.dumps(orig, proto)
1971 derived = unpickler.loads(green)
1972 self.assertEqual(orig, derived)
1973 self.assertTrue(isinstance(derived, SubclassDate))
1974
1975 def test_backdoor_resistance(self):
1976 # For fast unpickling, the constructor accepts a pickle byte string.

Callers

nothing calls this directly

Calls 5

SubclassDateClass · 0.85
assertTrueMethod · 0.80
dumpsMethod · 0.45
loadsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected