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 7e8c260 commit ebc7781Copy full SHA for ebc7781
tests/test_singularity_containers.py
@@ -7,13 +7,20 @@
7
import spikeinterface.sorters as ss
8
9
10
-@pytest.fixture
11
-def work_dir(request, tmpdir_factory):
12
- tmpdir = tmpdir_factory.mktemp("work_dir")
13
- os.chdir(tmpdir)
+@pytest.fixture(autouse=True)
+def work_dir(request, tmp_path):
+ """
+ This fixture, along with "run_kwargs" creates one folder per
14
+ test function using built-in tmp_path pytest fixture
15
+
16
+ The tmp_path will be the working directory for the test function
17
18
+ At the end of the each test function, a clean up will be done
19
20
+ os.chdir(tmp_path)
21
yield
22
os.chdir(request.config.invocation_dir)
- shutil.rmtree(str(tmpdir))
23
+ shutil.rmtree(str(tmp_path))
24
25
26
@pytest.fixture
0 commit comments