MCPcopy Create free account
hub / github.com/dateutil/dateutil / test_every_key_loads

Function test_every_key_loads

tests/test_tzpath_data.py:76–85  ·  view source on GitHub ↗

Every available key loads, from the source it was found in.

(tz_source)

Source from the content-addressed store, hash-verified

74
75
76def test_every_key_loads(tz_source):
77 """Every available key loads, from the source it was found in."""
78 tzpath = [os.path.join(path, "") for path in tz.TZPATH]
79 for key in _keys():
80 zone = tz.gettz(key)
81 assert isinstance(zone, tz.tzfile), key
82 assert zone.key == key
83
84 if tz_source == "tzpath":
85 assert any(zone._filename.startswith(p) for p in tzpath), key
86
87
88def test_utc_round_trip(tz_source):

Callers

nothing calls this directly

Calls 2

_keysFunction · 0.85
gettzMethod · 0.45

Tested by

no test coverage detected