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

Method test_pickling_subclass_date

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected