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

Function tz_source

tests/conftest.py:24–37  ·  view source on GitHub ↗

Runs a test against each source of IANA time zone data in turn. With ``"tzpath"``, only the data on TZPATH is used and the tzdata package is blocked, so a key that is missing or broken there makes the test fail instead of being silently answered by tzdata. With ``"tzdata"``, only the

(request)

Source from the content-addressed store, hash-verified

22
23@pytest.fixture(params=TZ_SOURCES)
24def tz_source(request):
25 """Runs a test against each source of IANA time zone data in turn.
26
27 With ``"tzpath"``, only the data on TZPATH is used and the tzdata package
28 is blocked, so a key that is missing or broken there makes the test fail
29 instead of being silently answered by tzdata. With ``"tzdata"``, only the
30 tzdata package is used.
31 """
32 reason = tz_source_skip_reason(request.param)
33 if reason is not None:
34 pytest.skip(reason)
35
36 with tz_source_context(request.param):
37 yield request.param
38
39
40@pytest.fixture

Callers

nothing calls this directly

Calls 2

tz_source_skip_reasonFunction · 0.85
tz_source_contextFunction · 0.85

Tested by

no test coverage detected