(tmpdir, monkeypatch)
| 57 | |
| 58 | @pytest.fixture |
| 59 | def tmp_conf_dir(tmpdir, monkeypatch): |
| 60 | # Set temporary DASK_CONFIG in dask.config and handle reloading of module |
| 61 | # before and after test so module initialization takes place setting attrs |
| 62 | # like PATH, config, paths, and module level constants |
| 63 | monkeypatch.setenv("DASK_CONFIG", str(tmpdir)) |
| 64 | originals = dask.config.__dict__.copy() |
| 65 | dask.config = importlib.reload(dask.config) |
| 66 | dask.config.paths = [str(tmpdir)] |
| 67 | try: |
| 68 | yield pathlib.Path(tmpdir) |
| 69 | finally: |
| 70 | dask.config = importlib.reload(dask.config) |
| 71 | dask.config.__dict__.update(originals) |
| 72 | |
| 73 | |
| 74 | @pytest.mark.parametrize("value", ("333MiB", 2, [1, 2], {"foo": "bar"}, None)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…