Ensure that setting tz.TZPATH changes where `tz.gettz` searches.
(tmp_path)
| 587 | |
| 588 | |
| 589 | def test_tzpath_setting(tmp_path): |
| 590 | """Ensure that setting tz.TZPATH changes where `tz.gettz` searches.""" |
| 591 | |
| 592 | with set_tzpath([tmp_path]): |
| 593 | _copy_resource_to( |
| 594 | "liliput_tzif", os.path.join(str(tmp_path), "Fictional", "Liliput") |
| 595 | ) |
| 596 | tz.gettz.cache_clear() |
| 597 | |
| 598 | fiction_land = tz.gettz("Fictional/Liliput") |
| 599 | |
| 600 | assert fiction_land is not None |
| 601 | |
| 602 | |
| 603 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected