Skip to content

Commit d0e0906

Browse files
committed
fixing the test script - using pytest.main
1 parent 3633d35 commit d0e0906

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test_notebooks.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import os
21
import sys
3-
import time
42
from glob import glob
3+
import pytest
54

65
def test_version():
76
import nipype
@@ -90,7 +89,6 @@ def reduce_notebook_load(path):
9089
print('Reducing: %s' % n)
9190
notebooks.append(reduce_notebook_load(n))
9291

93-
for test in notebooks:
94-
pytest_cmd = 'pytest --nbval-lax --nbval-cell-timeout 7200 -v -s %s' % test
95-
print(pytest_cmd)
96-
os.system(pytest_cmd)
92+
# testing all tests from the notebooks list
93+
pytest.main(["--nbval-lax", "--nbval-cell-timeout", "7200", "-vs"] + notebooks)
94+

0 commit comments

Comments
 (0)