We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a2bc17 commit beb8d36Copy full SHA for beb8d36
tests/conftest.py
@@ -1,10 +1,21 @@
1
from pathlib import Path
2
3
import pytest
4
+from dask.distributed import Client, LocalCluster
5
6
TEST_DIR = Path(__file__).parent
7
8
9
+@pytest.fixture(scope="session", name="dask_client", autouse=True)
10
+def dask_client():
11
+ """Create a single client for use by all unit test cases."""
12
+ cluster = LocalCluster(n_workers=1, threads_per_worker=1, dashboard_address=":0")
13
+ client = Client(cluster)
14
+ yield client
15
+ client.close()
16
+ cluster.close()
17
+
18
19
@pytest.fixture
20
def test_data_dir():
21
return Path(TEST_DIR) / "data"
0 commit comments