()
| 215 | @pytest.mark.skipif(sys.platform != "win32", |
| 216 | reason="Timezone database is already provided.") |
| 217 | def test_download_tzdata_on_windows(): |
| 218 | tzdata_path = os.path.expandvars(r"%USERPROFILE%\Downloads\tzdata") |
| 219 | |
| 220 | # Download timezone database and remove data in case it already exists |
| 221 | if (os.path.exists(tzdata_path)): |
| 222 | shutil.rmtree(tzdata_path) |
| 223 | with pytest.warns(FutureWarning, match="deprecated"): |
| 224 | download_tzdata_on_windows() |
| 225 | |
| 226 | # Inspect the folder |
| 227 | assert os.path.exists(tzdata_path) |
| 228 | assert os.path.exists(os.path.join(tzdata_path, "windowsZones.xml")) |
| 229 | assert os.path.exists(os.path.join(tzdata_path, "europe")) |
| 230 | assert 'version' in os.listdir(tzdata_path) |
nothing calls this directly
no test coverage detected