MCPcopy Create free account
hub / github.com/dask/dask / tmp_conf_dir

Function tmp_conf_dir

dask/tests/test_cli.py:55–67  ·  view source on GitHub ↗
(tmpdir, monkeypatch)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected