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

Function test_gettz_link

tests/test_tz.py:1120–1132  ·  view source on GitHub ↗

A link behaves like its target, but keeps its own key.

(tz_source, link, target)

Source from the content-addressed store, hash-verified

1118@pytest.mark.gettz
1119@pytest.mark.parametrize("link, target", LINKS)
1120def test_gettz_link(tz_source, link, target):
1121 """A link behaves like its target, but keeps its own key."""
1122 if link not in tz.available_iana_timezones():
1123 pytest.skip("%s is not in this time zone data" % link)
1124
1125 link_zone = tz.gettz(link)
1126 target_zone = tz.gettz(target)
1127
1128 assert isinstance(link_zone, tz.tzfile)
1129 assert isinstance(target_zone, tz.tzfile)
1130 assert link_zone == target_zone
1131 assert link_zone.key == link
1132 assert target_zone.key == target
1133
1134
1135@pytest.mark.gettz

Callers

nothing calls this directly

Calls 1

gettzMethod · 0.45

Tested by

no test coverage detected