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

Function test_gettz_missing_search_path_entry

tests/test_tzfile.py:2382–2388  ·  view source on GitHub ↗

Search path entries that do not exist are skipped, not errors.

(zoneinfo_cache, tmp_path)

Source from the content-addressed store, hash-verified

2380
2381@pytest.mark.parametrize("zoneinfo_cache", ["fat"], indirect=True)
2382def test_gettz_missing_search_path_entry(zoneinfo_cache, tmp_path):
2383 """Search path entries that do not exist are skipped, not errors."""
2384 missing = str(tmp_path / "does_not_exist")
2385 with set_tzpath((missing, zoneinfo_cache[0]), block_tzdata=True):
2386 tz.gettz.cache_clear()
2387 assert tz.gettz("America/New_York") is not None
2388 assert tz.gettz("America/Nope") is None
2389
2390
2391@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

set_tzpathFunction · 0.85
cache_clearMethod · 0.80
gettzMethod · 0.45

Tested by

no test coverage detected