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

Method test_utc

Lib/test/test_zoneinfo/test_zoneinfo_property.py:122–128  ·  view source on GitHub ↗
(self, dt)

Source from the content-addressed store, hash-verified

120 @hypothesis.example(dt=datetime.time(12, 0))
121 @hypothesis.example(dt=datetime.time(23, 59, 59, 999999))
122 def test_utc(self, dt):
123 zi = self.klass("UTC")
124 dt_zi = dt.replace(tzinfo=zi)
125
126 self.assertEqual(dt_zi.utcoffset(), ZERO)
127 self.assertEqual(dt_zi.dst(), ZERO)
128 self.assertEqual(dt_zi.tzname(), "UTC")
129
130
131class CZoneInfoTest(ZoneInfoTest):

Callers

nothing calls this directly

Calls 5

replaceMethod · 0.45
assertEqualMethod · 0.45
utcoffsetMethod · 0.45
dstMethod · 0.45
tznameMethod · 0.45

Tested by

no test coverage detected