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

Method test_dump_utc_aware_datetime

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

Source from the content-addressed store, hash-verified

875 self.assertEqual(loaded_dt, dt)
876
877 def test_dump_utc_aware_datetime(self):
878 dt = datetime.datetime(2345, 6, 7, 8, 9, 10, tzinfo=datetime.UTC)
879 for fmt in ALL_FORMATS:
880 s = plistlib.dumps(dt, fmt=fmt, aware_datetime=True)
881 loaded_dt = plistlib.loads(s, fmt=fmt, aware_datetime=True)
882 self.assertEqual(loaded_dt.tzinfo, datetime.UTC)
883 self.assertEqual(loaded_dt, dt)
884
885 @unittest.skipUnless("America/Los_Angeles" in zoneinfo.available_timezones(),
886 "Can't find timezone datebase")

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected