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)
| 22 | |
| 23 | @pytest.fixture(params=TZ_SOURCES) |
| 24 | def 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 |
nothing calls this directly
no test coverage detected