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

Method test_compat_unpickle

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

Source from the content-addressed store, hash-verified

1725 self.assertEqual(orig.__reduce__(), orig.__reduce_ex__(2))
1726
1727 def test_compat_unpickle(self):
1728 tests = [
1729 b"cdatetime\ndate\n(S'\\x07\\xdf\\x0b\\x1b'\ntR.",
1730 b'cdatetime\ndate\n(U\x04\x07\xdf\x0b\x1btR.',
1731 b'\x80\x02cdatetime\ndate\nU\x04\x07\xdf\x0b\x1b\x85R.',
1732 ]
1733 args = 2015, 11, 27
1734 expected = self.theclass(*args)
1735 for data in tests:
1736 for loads in pickle_loads:
1737 derived = loads(data, encoding='latin1')
1738 self.assertEqual(derived, expected)
1739
1740 def test_compare(self):
1741 t1 = self.theclass(2, 3, 4)

Callers

nothing calls this directly

Calls 2

loadsFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected