File tree Expand file tree Collapse file tree 7 files changed +17
-18
lines changed Expand file tree Collapse file tree 7 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -94,9 +94,10 @@ before_install:
9494
9595install :
9696- travis_retry pip install $EXTRA_PIP_FLAGS -e .[$NIPYPE_EXTRAS]
97+ - travis_retry pip install pytest-xdist
9798
9899script :
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
100101
101102after_script :
102103- 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}
2929py.test -v --junitxml=${WORKDIR} /tests/pytests_py${PYTHON_VERSION} .xml \
3030 --cov nipype --cov-config /src/nipype/.coveragerc \
3131 --cov-report xml:${WORKDIR} /tests/coverage_py${PYTHON_VERSION} .xml \
32+ -n auto \
3233 -c ${TESTPATH} /pytest.ini ${TESTPATH}
3334exit_code=$?
3435
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ function generate_main_dockerfile() {
9292 conda_install=' python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
9393 icu=58.1 libxml2 libxslt matplotlib mkl numpy paramiko
9494 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 " \
9696 activate=true \
9797 --copy docker/files/run_builddocs.sh docker/files/run_examples.sh \
9898 docker/files/run_pytests.sh nipype/external/fsl_imglob.py /usr/bin/ \
Original file line number Diff line number Diff line change 2525
2626
2727class 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 :
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' )
3944 args .append (os .path .dirname (__file__ ))
4045 pytest .main (args = args )
4146
Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ def get_nipype_gitversion():
109109SCIPY_MIN_VERSION = '0.14'
110110TRAITS_MIN_VERSION = '4.6'
111111DATEUTIL_MIN_VERSION = '2.2'
112- PYTEST_MIN_VERSION = '3.6'
113112FUTURE_MIN_VERSION = '0.16.0'
114113SIMPLEJSON_MIN_VERSION = '3.8.0'
115114PROV_VERSION = '1.5.2'
@@ -149,19 +148,16 @@ def get_nipype_gitversion():
149148 'neurdflib' ,
150149 'click>=%s' % CLICK_MIN_VERSION ,
151150 'funcsigs' ,
152- 'mock' ,
153151 'pydotplus' ,
154152 'pydot>=%s' % PYDOT_MIN_VERSION ,
155153 'packaging' ,
156154 'futures; python_version == "2.7"' ,
155+ 'configparser; python_version <= "3.4"' ,
157156]
158157
159- if sys .version_info <= (3 , 4 ):
160- REQUIRES .append ('configparser' )
161-
162158TESTS_REQUIRES = [
163- 'pytest>=%s' % PYTEST_MIN_VERSION ,
164- 'pytest-xdist ' ,
159+ 'mock' ,
160+ 'pytest' ,
165161 'pytest-cov' ,
166162 'codecov' ,
167163 'pytest-env' ,
Original file line number Diff line number Diff line change 11[pytest]
22norecursedirs = .git build dist doc nipype/external tools examples src
3- addopts = --doctest-modules -n auto
3+ addopts = --doctest-modules
44doctest_optionflags = ALLOW_UNICODE NORMALIZE_WHITESPACE
55env =
66 PYTHONHASHSEED =0
Original file line number Diff line number Diff line change @@ -11,10 +11,6 @@ neurdflib
1111click >= 6.6.0
1212funcsigs
1313configparser
14- pytest >= 3.0
15- pytest-xdist
16- pytest-env
17- mock
1814pydotplus
1915pydot >= 1.2.3
2016packaging
You can’t perform that action at this time.
0 commit comments