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

Method test_large_timestamp

Lib/test/test_plistlib.py:995–1002  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

993 self.assertEqual(result, 'seed')
994
995 def test_large_timestamp(self):
996 # Issue #26709: 32-bit timestamp out of range
997 for ts in -2**31-1, 2**31:
998 with self.subTest(ts=ts):
999 d = (datetime.datetime(1970, 1, 1, 0, 0) +
1000 datetime.timedelta(seconds=ts))
1001 data = plistlib.dumps(d, fmt=plistlib.FMT_BINARY)
1002 self.assertEqual(plistlib.loads(data), d)
1003
1004 def test_load_singletons(self):
1005 self.assertIs(self.decode(b'\x00'), None)

Callers

nothing calls this directly

Calls 5

subTestMethod · 0.80
datetimeMethod · 0.80
dumpsMethod · 0.45
assertEqualMethod · 0.45
loadsMethod · 0.45

Tested by

no test coverage detected