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

Method test_time_fixed_offset

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

Source from the content-addressed store, hash-verified

401 self.assertIs(t.dst(), None)
402
403 def test_time_fixed_offset(self):
404 for key, offset in self.fixed_offset_zones():
405 zi = self.zone_from_key(key)
406
407 t = time(11, 15, 1, 34471, tzinfo=zi)
408
409 with self.subTest(key=key):
410 self.assertEqual(t.tzname(), offset.tzname)
411 self.assertEqual(t.utcoffset(), offset.utcoffset)
412 self.assertEqual(t.dst(), offset.dst)
413
414 def test_cache_exception(self):
415 class Incomparable(str):

Callers

nothing calls this directly

Calls 8

fixed_offset_zonesMethod · 0.95
zone_from_keyMethod · 0.95
timeClass · 0.90
subTestMethod · 0.45
assertEqualMethod · 0.45
tznameMethod · 0.45
utcoffsetMethod · 0.45
dstMethod · 0.45

Tested by

no test coverage detected