Skip to content

Commit 0161e81

Browse files
committed
RF: Drop pytest-xdist requirement, minimum pytest version
1 parent 7085e2b commit 0161e81

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

nipype/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,21 @@
2525

2626

2727
class NipypeTester(object):
28-
def __call__(self, doctests=True, parallel=True):
28+
def __call__(self, doctests=True, parallel=False):
2929
try:
3030
import pytest
31-
except:
31+
except ImportError:
3232
raise RuntimeError(
3333
'py.test not installed, run: pip install pytest')
3434
args = []
3535
if not doctests:
3636
args.extend(['-p', 'no:doctest'])
37-
if not parallel:
37+
if parallel:
38+
try:
39+
import xdist
40+
except ImportError:
41+
raise RuntimeError(
42+
"pytest-xdist required for parallel run")
3843
args.append('-n0')
3944
args.append(os.path.dirname(__file__))
4045
pytest.main(args=args)

nipype/info.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ def get_nipype_gitversion():
109109
SCIPY_MIN_VERSION = '0.14'
110110
TRAITS_MIN_VERSION = '4.6'
111111
DATEUTIL_MIN_VERSION = '2.2'
112-
PYTEST_MIN_VERSION = '3.6'
113112
FUTURE_MIN_VERSION = '0.16.0'
114113
SIMPLEJSON_MIN_VERSION = '3.8.0'
115114
PROV_VERSION = '1.5.2'
@@ -160,8 +159,7 @@ def get_nipype_gitversion():
160159

161160
TESTS_REQUIRES = [
162161
'mock',
163-
'pytest>=%s' % PYTEST_MIN_VERSION,
164-
'pytest-xdist',
162+
'pytest',
165163
'pytest-cov',
166164
'codecov',
167165
'pytest-env',

nipype/pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[pytest]
22
norecursedirs = .git build dist doc nipype/external tools examples src
3-
addopts = --doctest-modules -n auto
3+
addopts = --doctest-modules
44
doctest_optionflags = ALLOW_UNICODE NORMALIZE_WHITESPACE
55
env =
66
PYTHONHASHSEED=0

0 commit comments

Comments
 (0)