MCPcopy Index your code
hub / github.com/dask/dask / tmp_conf_dir

Function tmp_conf_dir

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

Source from the content-addressed store, hash-verified

57
58@pytest.fixture
59def 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))

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…