File tree 7 files changed +17
-18
lines changed
7 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -94,9 +94,10 @@ before_install:
94
94
95
95
install :
96
96
- travis_retry pip install $EXTRA_PIP_FLAGS -e .[$NIPYPE_EXTRAS]
97
+ - travis_retry pip install pytest-xdist
97
98
98
99
script :
99
- - py.test -v --cov nipype --cov-config .coveragerc --cov-report xml:cov.xml -c nipype/pytest.ini --doctest-modules nipype
100
+ - py.test -v --cov nipype --cov-config .coveragerc --cov-report xml:cov.xml -c nipype/pytest.ini --doctest-modules nipype -n auto
100
101
101
102
after_script :
102
103
- codecov --file cov.xml --flags unittests -e TRAVIS_JOB_NUMBER
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export COVERAGE_FILE=${WORKDIR}/tests/.coverage.py${PYTHON_VERSION}
29
29
py.test -v --junitxml=${WORKDIR} /tests/pytests_py${PYTHON_VERSION} .xml \
30
30
--cov nipype --cov-config /src/nipype/.coveragerc \
31
31
--cov-report xml:${WORKDIR} /tests/coverage_py${PYTHON_VERSION} .xml \
32
+ -n auto \
32
33
-c ${TESTPATH} /pytest.ini ${TESTPATH}
33
34
exit_code=$?
34
35
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ function generate_main_dockerfile() {
92
92
conda_install=' python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
93
93
icu=58.1 libxml2 libxslt matplotlib mkl numpy paramiko
94
94
pandas psutil scikit-learn scipy traits=4.6.0' \
95
- pip_install=" grabbit==0.1.2 https://github.com/INCF/pybids/tarball/0.6.5 " \
95
+ pip_install=" pytest-xdist " \
96
96
activate=true \
97
97
--copy docker/files/run_builddocs.sh docker/files/run_examples.sh \
98
98
docker/files/run_pytests.sh nipype/external/fsl_imglob.py /usr/bin/ \
Original file line number Diff line number Diff line change 25
25
26
26
27
27
class NipypeTester (object ):
28
- def __call__ (self , doctests = True , parallel = True ):
28
+ def __call__ (self , doctests = True , parallel = False ):
29
29
try :
30
30
import pytest
31
- except :
31
+ except ImportError :
32
32
raise RuntimeError (
33
33
'py.test not installed, run: pip install pytest' )
34
34
args = []
35
35
if not doctests :
36
36
args .extend (['-p' , 'no:doctest' ])
37
- if not parallel :
38
- args .append ('-n0' )
37
+ if parallel :
38
+ try :
39
+ import xdist
40
+ except ImportError :
41
+ raise RuntimeError (
42
+ "pytest-xdist required for parallel run" )
43
+ args .append ('-n auto' )
39
44
args .append (os .path .dirname (__file__ ))
40
45
pytest .main (args = args )
41
46
Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ def get_nipype_gitversion():
109
109
SCIPY_MIN_VERSION = '0.14'
110
110
TRAITS_MIN_VERSION = '4.6'
111
111
DATEUTIL_MIN_VERSION = '2.2'
112
- PYTEST_MIN_VERSION = '3.6'
113
112
FUTURE_MIN_VERSION = '0.16.0'
114
113
SIMPLEJSON_MIN_VERSION = '3.8.0'
115
114
PROV_VERSION = '1.5.2'
@@ -149,19 +148,16 @@ def get_nipype_gitversion():
149
148
'neurdflib' ,
150
149
'click>=%s' % CLICK_MIN_VERSION ,
151
150
'funcsigs' ,
152
- 'mock' ,
153
151
'pydotplus' ,
154
152
'pydot>=%s' % PYDOT_MIN_VERSION ,
155
153
'packaging' ,
156
154
'futures; python_version == "2.7"' ,
155
+ 'configparser; python_version <= "3.4"' ,
157
156
]
158
157
159
- if sys .version_info <= (3 , 4 ):
160
- REQUIRES .append ('configparser' )
161
-
162
158
TESTS_REQUIRES = [
163
- 'pytest>=%s' % PYTEST_MIN_VERSION ,
164
- 'pytest-xdist ' ,
159
+ 'mock' ,
160
+ 'pytest' ,
165
161
'pytest-cov' ,
166
162
'codecov' ,
167
163
'pytest-env' ,
Original file line number Diff line number Diff line change 1
1
[pytest]
2
2
norecursedirs = .git build dist doc nipype/external tools examples src
3
- addopts = --doctest-modules -n auto
3
+ addopts = --doctest-modules
4
4
doctest_optionflags = ALLOW_UNICODE NORMALIZE_WHITESPACE
5
5
env =
6
6
PYTHONHASHSEED =0
Original file line number Diff line number Diff line change @@ -11,10 +11,6 @@ neurdflib
11
11
click >= 6.6.0
12
12
funcsigs
13
13
configparser
14
- pytest >= 3.0
15
- pytest-xdist
16
- pytest-env
17
- mock
18
14
pydotplus
19
15
pydot >= 1.2.3
20
16
packaging
You can’t perform that action at this time.
0 commit comments