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

Method test_load_aware_datetime

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

Source from the content-addressed store, hash-verified

1137 check(b'bplist00' + struct.pack('>6xBBQQQ', 1, 1, s, 0, 8))
1138
1139 def test_load_aware_datetime(self):
1140 data = (b'bplist003B\x04>\xd0d\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00'
1141 b'\x01\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00'
1142 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11')
1143 self.assertEqual(plistlib.loads(data, aware_datetime=True),
1144 datetime.datetime(2345, 6, 7, 8, tzinfo=datetime.UTC))
1145
1146 @unittest.skipUnless("America/Los_Angeles" in zoneinfo.available_timezones(),
1147 "Can't find timezone datebase")

Callers

nothing calls this directly

Calls 3

datetimeMethod · 0.80
assertEqualMethod · 0.45
loadsMethod · 0.45

Tested by

no test coverage detected