Skip to content

Commit 108f03c

Browse files
committed
TEST: Run all tests (including doctests) from data directory
1 parent d3a5b8b commit 108f03c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

nipype/conftest.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ def add_np(doctest_namespace):
1111
filepath = os.path.dirname(os.path.realpath(__file__))
1212
datadir = os.path.realpath(os.path.join(filepath, 'testing/data'))
1313
doctest_namespace["datadir"] = datadir
14+
15+
16+
@pytest.fixture(scope='session', autouse=True)
17+
def in_testing():
18+
datadir = os.path.realpath(
19+
os.path.join(os.path.dirname(__file__), 'testing/data'))
20+
origdir = os.getcwd()
21+
os.chdir(datadir)
22+
yield
23+
os.chdir(origdir)

0 commit comments

Comments
 (0)