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

Method test_utc

Lib/test/test_zoneinfo/test_zoneinfo.py:282–288  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

280 zone.fromutc(val)
281
282 def test_utc(self):
283 zi = self.klass("UTC")
284 dt = datetime(2020, 1, 1, tzinfo=zi)
285
286 self.assertEqual(dt.utcoffset(), ZERO)
287 self.assertEqual(dt.dst(), ZERO)
288 self.assertEqual(dt.tzname(), "UTC")
289
290 def test_unambiguous(self):
291 test_cases = []

Callers

nothing calls this directly

Calls 5

datetimeClass · 0.90
assertEqualMethod · 0.45
utcoffsetMethod · 0.45
dstMethod · 0.45
tznameMethod · 0.45

Tested by

no test coverage detected