An absolute path to a TZif file is loaded directly and has no key.
(zoneinfo_cache)
| 2330 | |
| 2331 | @pytest.mark.parametrize("zoneinfo_cache", ["fat"], indirect=True) |
| 2332 | def test_gettz_absolute_path(zoneinfo_cache): |
| 2333 | """An absolute path to a TZif file is loaded directly and has no key.""" |
| 2334 | fpath = os.path.join(zoneinfo_cache[0], "America", "New_York") |
| 2335 | |
| 2336 | with set_tzpath((), block_tzdata=True): |
| 2337 | tz.gettz.cache_clear() |
| 2338 | zone = tz.gettz(fpath) |
| 2339 | |
| 2340 | assert isinstance(zone, tz.tzfile) |
| 2341 | assert zone.key is None |
| 2342 | assert repr(zone) == "tzfile(%r)" % fpath |
| 2343 | |
| 2344 | |
| 2345 | @pytest.mark.parametrize("zoneinfo_cache", ["fat"], indirect=True) |
nothing calls this directly
no test coverage detected