Skip to content

Commit 2741147

Browse files
committed
Make PyTest create a temporary directory to run tests in, so we don't fill up the source directory with output
1 parent 802e203 commit 2741147

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import os
2+
import pytest
3+
import tempfile
4+
5+
@pytest.fixture(scope="session", autouse=True)
6+
def config():
7+
tmpdir = tempfile.mkdtemp(suffix='fidimag-tests')
8+
os.chdir(tmpdir)

0 commit comments

Comments
 (0)