Test dataset config.
(monkeypatch, tmp_path)
| 41 | |
| 42 | |
| 43 | def test_datasets(monkeypatch, tmp_path): |
| 44 | """Test dataset config.""" |
| 45 | # gh-4192 |
| 46 | fake_path = tmp_path / "MNE-testing-data" |
| 47 | fake_path.mkdir() |
| 48 | with open(fake_path / "version.txt", "w") as fid: |
| 49 | fid.write("9999.9999") |
| 50 | monkeypatch.setenv("_MNE_FAKE_HOME_DIR", str(tmp_path)) |
| 51 | monkeypatch.setenv("MNE_DATASETS_TESTING_PATH", str(tmp_path)) |
| 52 | got_path = str(testing.data_path(download=False, verbose="debug")) |
| 53 | assert got_path == str(fake_path) |
| 54 | |
| 55 | |
| 56 | def test_url_to_local_path(): |