Skip to content

Pytest #1722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 84 commits into from
Dec 10, 2016
Merged

Pytest #1722

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
c00c058
pytest version of test_utility
djarecka Oct 19, 2016
191fb56
removing nose from travis, testing already rewritten tests using pytest
djarecka Oct 19, 2016
6220e40
changing tests: removing yield and nose library, introducing pytest p…
djarecka Oct 26, 2016
0f0ebb7
removing extra imports within functions
djarecka Oct 26, 2016
a618b18
the simplest change to py.test; all class structure is the same
djarecka Oct 26, 2016
ac320a8
changing import statements
djarecka Oct 27, 2016
88c461c
adding previously changed tests to pytest (forgot to do it, so they w…
djarecka Oct 27, 2016
0e4425a
removing nose/unittest library and adding py.test; didn't change the …
djarecka Oct 27, 2016
0126f0c
changing tests in test_base to py.test: removing nose library, changi…
djarecka Oct 27, 2016
93aa0f5
small editing in various files
djarecka Oct 27, 2016
b57cda4
testing py.test and the test_bunch_hash; I don't understand behavior,…
djarecka Oct 28, 2016
1153383
checking if the object is a string and a path in get_bunch_hash; pyte…
djarecka Nov 2, 2016
858afcc
changing generator of auto-tests, tools/checkspecs.py, so it uses ass…
djarecka Nov 3, 2016
ac1f6ac
testing all interface/tests using py.test (still doesnt check all nip…
djarecka Nov 3, 2016
1a42568
removing assert_equal and imports that are not used
djarecka Nov 5, 2016
d56eb89
changing unittest to pytest
djarecka Nov 5, 2016
1006d5c
changing test_spec_JoinFusion (ants) to pytest
djarecka Nov 6, 2016
f068483
adding interface/ants to travis
djarecka Nov 7, 2016
28cb5bc
moving to pytest the fsl tests
djarecka Nov 11, 2016
c394929
finished fsl/tests/test_maths: the general structure of the file was …
djarecka Nov 15, 2016
7909c21
fixing for python3
djarecka Nov 16, 2016
bc5a786
changing more tests from fsl to pytest
djarecka Nov 16, 2016
5a1b38d
changing last tests from fsl to pytest (still have 3 failed, i believ…
djarecka Nov 17, 2016
e1c1453
testing freesurface with travis
djarecka Nov 17, 2016
a5becab
changing tests to pytest within spm
djarecka Nov 17, 2016
4d77961
changing rest of the tests from spm to pytest; including in travis
djarecka Nov 18, 2016
b0f6ed3
changing tests from nitime to pytest; including in travis
djarecka Nov 18, 2016
1cdedfb
changing tests from freesurface to pytest; did NOT run them (test con…
djarecka Nov 18, 2016
e7e5009
fixing some fixtures
djarecka Nov 18, 2016
646ac5a
running pytest on full interface dir; it still have 3 failures from f…
djarecka Nov 18, 2016
53b9503
temporal version without new auto tests, just checking something
djarecka Nov 18, 2016
b318cf1
coming back to the new auto tests
djarecka Nov 18, 2016
0895360
temporarily removing the assert that gives 3 failing tests
djarecka Nov 18, 2016
f6d4a1e
removing classmethod decorator (they were not really classmethods)
djarecka Nov 21, 2016
20be27a
changing tests from algorithms to pytest; leaving mock library in one…
djarecka Nov 21, 2016
a0490c5
changing pipeline tests to pytest; some tests are xfail without any d…
djarecka Nov 22, 2016
081aa79
changing caching tests to pytest
djarecka Nov 22, 2016
085bdc5
changing testing tests to pytest; still should remove mock
djarecka Nov 22, 2016
35b6589
changing tests from utils to pytest
djarecka Nov 22, 2016
eb42c1a
changing tests from workflow to pytest; there is still mock library used
djarecka Nov 23, 2016
6a56522
including changes from #1707
djarecka Nov 23, 2016
7bc5809
running py.test for whole nipype
djarecka Nov 23, 2016
4c909d9
fixing the problem with test_BaseInterface (resetting the input_spec)
djarecka Nov 23, 2016
d450806
small cleaning
djarecka Nov 23, 2016
9561206
removing skipif from a new test (skipif is already applied to whole c…
djarecka Nov 25, 2016
2897c4d
changing assertRaisesRegexp from unittest to pytest.raises_regexp; py…
djarecka Nov 25, 2016
332f9a4
adjusting a new test to pytest
djarecka Nov 25, 2016
a297583
adding pytest-raisesregexp installation to travis
djarecka Nov 25, 2016
77cc0a8
fixing the travis file
djarecka Nov 25, 2016
8899d36
a small adjustment to on auto test after rebase
djarecka Nov 25, 2016
cbb1a46
small cleaning after rebase
djarecka Nov 26, 2016
6a920c6
changing # doctest: +IGNORE_UNICODE to # doctest: +ALLOW_UNICODE; +I…
djarecka Nov 27, 2016
85c8822
checking doctest with pytest; had to install click library; 3 doctest…
djarecka Nov 27, 2016
9079f9d
fixing travis file
djarecka Nov 27, 2016
09f6a50
fixing travis file
djarecka Nov 27, 2016
b526416
changing 2 docstrings to pass pytest with doctests
djarecka Nov 27, 2016
2198049
fixing multiproc test
djarecka Nov 28, 2016
2a958e9
changing the circle runs: it runs a new script run_pytest.sh instead …
djarecka Nov 28, 2016
d844e17
trying to use xml files and flags with codecov
djarecka Nov 30, 2016
187baaa
fixing xml file names
djarecka Nov 30, 2016
01204f6
updating my comments within run_pytest
djarecka Dec 3, 2016
e6d5525
updating multiproc tests after rebasing
djarecka Dec 5, 2016
f00bb52
updating preprocess tests after rebasing; had to fix one line (waitin…
djarecka Dec 5, 2016
14b55f8
changing requirements.txt and info.py: removing nose and doctest-igno…
djarecka Dec 5, 2016
2531b1f
changing pip to conda in test_pytest.sh
djarecka Dec 5, 2016
891aca1
fixing TESTS_REQUIRES in info.py
djarecka Dec 6, 2016
e895990
removing notes about mocking and patching; will create another PR
djarecka Dec 6, 2016
f39597b
removing install pytest from travis and run_pytest; both travis and c…
djarecka Dec 6, 2016
8f6c1e1
removing the comments that described my changes
djarecka Dec 6, 2016
551d913
removing tests that contained import statements only
djarecka Dec 6, 2016
ea479bc
applying my suggestions from my notes
djarecka Dec 6, 2016
3e8bb7c
removing my notes regarding further improvements or my small concerns
djarecka Dec 6, 2016
7af2eca
removing notes/questions from run_pytest
djarecka Dec 6, 2016
dec6e3c
removing run_nosetest script
djarecka Dec 6, 2016
9796bad
explicitly importing numpy.testing where assert_equal or assert_almos…
djarecka Dec 7, 2016
f833630
removing some remnants of nose in test functions or docstrings
djarecka Dec 7, 2016
1a63a7a
updating rtd_requirements.txt and doc/devel/testing_nipype.rst to the…
djarecka Dec 7, 2016
9efd32c
changing Makefile: updating test-code and test-coverage, removed test…
djarecka Dec 7, 2016
65d1223
checking sys.version_info instead of TRAVIS_PYTHON_VERSION in the mul…
djarecka Dec 7, 2016
97689ae
fixing test_confounds.py after rebasing
djarecka Dec 7, 2016
043be21
all test with plugin= has been mark as skipped until the issue is solved
djarecka Dec 8, 2016
01f4ed8
fixing the last commit
djarecka Dec 8, 2016
7a2fdb5
removing pip install nose from Dockerfiles
djarecka Dec 8, 2016
7b00617
removing nose from new tests after rebasing
djarecka Dec 9, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ install:
echo "data_file = ${COVERAGE_DATA_FILE}" >> ${COVERAGE_PROCESS_START}; }
- travis_retry inst
script:
- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest --with-doctest-ignore-unicode --with-cov --cover-package nipype --logging-level=DEBUG --verbosity=3
- py.test --doctest-modules --cov=nipype nipype
after_success:
- bash <(curl -s https://codecov.io/bash) -t ac172a50-8e66-42e5-8822-5373fcf54686 -cF unittests
deploy:
Expand Down
13 changes: 4 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
PYTHON ?= python
NOSETESTS=`which nosetests`

.PHONY: zipdoc sdist egg upload_to_pypi trailing-spaces clean-pyc clean-so clean-build clean-ctags clean in inplace test-code test-doc test-coverage test html specs check-before-commit check
.PHONY: zipdoc sdist egg upload_to_pypi trailing-spaces clean-pyc clean-so clean-build clean-ctags clean in inplace test-code test-coverage test html specs check-before-commit check

zipdoc: html
zip documentation.zip doc/_build/html
Expand Down Expand Up @@ -56,16 +56,11 @@ inplace:
$(PYTHON) setup.py build_ext -i

test-code: in
python -W once:FSL:UserWarning:nipype $(NOSETESTS) --with-doctest --with-doctest-ignore-unicode --logging-level=DEBUG --verbosity=3 nipype

test-doc:
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --doctest-tests --doctest-extension=rst \
--doctest-fixtures=_fixture doc/
py.test --doctest-module nipype

test-coverage: clean-tests in
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --with-coverage --cover-package=nipype \
--config=.coveragerc

py.test --doctest-modules --cov-config .coveragerc --cov=nipype nipype

test: tests # just another name
tests: clean test-code

Expand Down
12 changes: 6 additions & 6 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies:
- sudo apt-get -y update && sudo apt-get install -y wget bzip2

override:
- mkdir -p ~/examples ~/scratch/nose ~/scratch/logs
- mkdir -p ~/examples ~/scratch/pytest ~/scratch/logs
- if [[ ! -d ~/examples/nipype-tutorial ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-tutorial.tar.bz2 "${DATA_NIPYPE_TUTORIAL_URL}" && tar xjf nipype-tutorial.tar.bz2 -C ~/examples/; fi
- if [[ ! -d ~/examples/nipype-fsl_course_data ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-fsl_course_data.tar.gz "${DATA_NIPYPE_FSL_COURSE}" && tar xzf nipype-fsl_course_data.tar.gz -C ~/examples/; fi
- if [[ ! -d ~/examples/feeds ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O fsl-5.0.9-feeds.tar.gz "${DATA_NIPYPE_FSL_FEEDS}" && tar xzf fsl-5.0.9-feeds.tar.gz -C ~/examples/; fi
Expand All @@ -35,10 +35,10 @@ dependencies:
test:
override:
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /root/src/nipype/doc nipype/nipype_test:py35 /usr/bin/run_builddocs.sh
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -e TRAVIS_PYTHON_VERSION="3.5" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py35 /usr/bin/run_nosetests.sh py35 :
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py35 /usr/bin/run_pytests.sh py35 :
timeout: 2600
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py27 /usr/bin/run_pytests.sh py27 :
timeout: 2600
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -e TRAVIS_PYTHON_VERSION="2.7" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py27 /usr/bin/run_nosetests.sh py27 :
timeout: 5200
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh test_spm Linear /root/examples/ workflow3d :
timeout: 1600
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh test_spm Linear /root/examples/ workflow4d :
Expand All @@ -56,8 +56,8 @@ test:

post:
- bash docker/circleci/teardown.sh
- for xml_f in ${CIRCLE_TEST_REPORTS}/nose/coverage*.xml; do bash <(curl -s https://codecov.io/bash) -f $xml_f -t ac172a50-8e66-42e5-8822-5373fcf54686 -F unittests; done
- for xml_f in ${CIRCLE_TEST_REPORTS}/nose/smoketest*.xml; do bash <(curl -s https://codecov.io/bash) -f $xml_f -t ac172a50-8e66-42e5-8822-5373fcf54686 -F smoketests; done
- for xml_f in ${CIRCLE_TEST_REPORTS}/pytest/coverage*.xml; do bash <(curl -s https://codecov.io/bash) -f $xml_f -t ac172a50-8e66-42e5-8822-5373fcf54686 -F unittests; done
- for xml_f in ${CIRCLE_TEST_REPORTS}/pytest/smoketest*.xml; do bash <(curl -s https://codecov.io/bash) -f $xml_f -t ac172a50-8e66-42e5-8822-5373fcf54686 -F smoketests; done

general:
artifacts:
Expand Down
21 changes: 12 additions & 9 deletions doc/devel/testing_nipype.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ or::
Test implementation
-------------------

Nipype testing framework is built upon `nose <http://nose.readthedocs.io/en/latest/>`_.
Nipype testing framework is built upon `pytest <http://doc.pytest.org/en/latest/>`_.
By the time these guidelines are written, Nipype implements 17638 tests.

After installation in developer mode, the tests can be run with the
Expand All @@ -50,20 +50,18 @@ following simple command at the root folder of the project ::

If ``make`` is not installed in the system, it is possible to run the tests using::

python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest \
--with-doctest-ignore-unicode --logging-level=DEBUG --verbosity=3 nipype
py.test --doctest-modules --cov=nipype nipype


A successful test run should complete in a few minutes and end with
A successful test run should complete in 10-30 minutes and end with
something like::

----------------------------------------------------------------------
Ran 17922 tests in 107.254s
2445 passed, 41 skipped, 7 xfailed in 1277.66 seconds

OK (SKIP=27)


All tests should pass (unless you're missing a dependency). If the ``SUBJECTS_DIR```
No test should fail (unless you're missing a dependency). If the ``SUBJECTS_DIR```
environment variable is not set, some FreeSurfer related tests will fail.
If any of the tests failed, please report them on our `bug tracker
<http://github.com/nipy/nipype/issues>`_.
Expand All @@ -90,6 +88,11 @@ Some tests in Nipype make use of some images distributed within the `FSL course
To enable the tests depending on these data, just unpack the targz file and set the :code:`FSL_COURSE_DATA` environment
variable to point to that folder.

Xfail tests
~~~~~~~~~~

Some tests are expect to fail until the code will be changed or for other reasons.


Avoiding any MATLAB calls from testing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -115,7 +118,7 @@ Nipype is as easy as follows::
-v ~/examples:/root/examples:ro \
-v ~/scratch:/scratch \
-w /root/src/nipype \
nipype/nipype_test:py27 /usr/bin/run_nosetests.sh
nipype/nipype_test:py27 /usr/bin/run_pytest.sh

For running nipype in Python 3.5::

Expand All @@ -126,4 +129,4 @@ For running nipype in Python 3.5::
-v ~/examples:/root/examples:ro \
-v ~/scratch:/scratch \
-w /root/src/nipype \
nipype/nipype_test:py35 /usr/bin/run_nosetests.sh
nipype/nipype_test:py35 /usr/bin/run_pytest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -u
PYTHON_VERSION=$( python -c "import sys; print('{}{}'.format(sys.version_info[0], sys.version_info[1]))" )

# Create necessary directories
mkdir -p /scratch/nose /scratch/crashfiles /scratch/logs/py${PYTHON_VERSION}
mkdir -p /scratch/pytest /scratch/crashfiles /scratch/logs/py${PYTHON_VERSION}

# Create a nipype config file
mkdir -p /root/.nipype
Expand All @@ -20,17 +20,18 @@ if [[ "${PYTHON_VERSION}" -lt "30" ]]; then
echo 'profile_runtime = true' >> /root/.nipype/nipype.cfg
fi

# Run tests
# Run tests using pytest
cd /root/src/nipype/
make clean
nosetests -s nipype -c /root/src/nipype/.noserc --xunit-file="/scratch/nosetests_py${PYTHON_VERSION}.xml" --cover-xml-file="/scratch/coverage_py${PYTHON_VERSION}.xml"
py.test --doctest-modules --cov-report xml:/scratch/coverage_py${PYTHON_VERSION}.xml --cov=nipype nipype


# Workaround: run here the profiler tests in python 3
if [[ "${PYTHON_VERSION}" -ge "30" ]]; then
echo '[execution]' >> /root/.nipype/nipype.cfg
echo 'profile_runtime = true' >> /root/.nipype/nipype.cfg
nosetests nipype/interfaces/tests/test_runtime_profiler.py --xunit-file="/scratch/nosetests_py${PYTHON_VERSION}_profiler.xml" --cover-xml-file="/scratch/coverage_py${PYTHON_VERSION}_profiler.xml"
nosetests nipype/pipeline/plugins/tests/test_multiproc*.py --xunit-file="/scratch/nosetests_py${PYTHON_VERSION}_multiproc.xml" --cover-xml-file="/scratch/coverage_py${PYTHON_VERSION}_multiproc.xml"
py.test --cov-report xml:/scratch/coverage_py${PYTHON_VERSION}_profiler.xml --cov=nipype nipype/interfaces/tests/test_runtime_profiler.py
py.test --cov-report xml:/scratch/coverage_py${PYTHON_VERSION}_multiproc.xml --cov=nipype nipype/pipeline/plugins/tests/test_multiproc*.py
fi

# Copy crashfiles to scratch
Expand Down
4 changes: 2 additions & 2 deletions docker/circleci/teardown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
set -u
set -e

mkdir -p ${CIRCLE_TEST_REPORTS}/nose
sudo mv ~/scratch/*.xml ${CIRCLE_TEST_REPORTS}/nose
mkdir -p ${CIRCLE_TEST_REPORTS}/pytest
sudo mv ~/scratch/*.xml ${CIRCLE_TEST_REPORTS}/pytest
mkdir -p ~/docs
sudo mv ~/scratch/docs/* ~/docs/
mkdir -p ~/logs
Expand Down
2 changes: 1 addition & 1 deletion docker/nipype_test/Dockerfile_base
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,6 @@ RUN conda config --add channels conda-forge && \
nitime \
dipy \
pandas && \
pip install nose-cov doctest-ignore-unicode configparser
pip install configparser

CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion docker/nipype_test/Dockerfile_py27
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ MAINTAINER The nipype developers https://github.com/nipy/nipype
# Downgrade python to 2.7
RUN conda update -y conda && \
conda update --all -y python=2.7 && \
pip install nose-cov doctest-ignore-unicode configparser
pip install configparser

COPY docker/circleci/run_* /usr/bin/
RUN chmod +x /usr/bin/run_*
Expand Down
5 changes: 2 additions & 3 deletions nipype/algorithms/tests/test_auto_AddCSVColumn.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ...testing import assert_equal
from ..misc import AddCSVColumn


Expand All @@ -15,7 +14,7 @@ def test_AddCSVColumn_inputs():

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(inputs.traits()[key], metakey), value
assert getattr(inputs.traits()[key], metakey) == value


def test_AddCSVColumn_outputs():
Expand All @@ -25,4 +24,4 @@ def test_AddCSVColumn_outputs():

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(outputs.traits()[key], metakey), value
assert getattr(outputs.traits()[key], metakey) == value
5 changes: 2 additions & 3 deletions nipype/algorithms/tests/test_auto_AddCSVRow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ...testing import assert_equal
from ..misc import AddCSVRow


Expand All @@ -16,7 +15,7 @@ def test_AddCSVRow_inputs():

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(inputs.traits()[key], metakey), value
assert getattr(inputs.traits()[key], metakey) == value


def test_AddCSVRow_outputs():
Expand All @@ -26,4 +25,4 @@ def test_AddCSVRow_outputs():

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(outputs.traits()[key], metakey), value
assert getattr(outputs.traits()[key], metakey) == value
5 changes: 2 additions & 3 deletions nipype/algorithms/tests/test_auto_AddNoise.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ...testing import assert_equal
from ..misc import AddNoise


Expand All @@ -21,7 +20,7 @@ def test_AddNoise_inputs():

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(inputs.traits()[key], metakey), value
assert getattr(inputs.traits()[key], metakey) == value


def test_AddNoise_outputs():
Expand All @@ -31,4 +30,4 @@ def test_AddNoise_outputs():

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(outputs.traits()[key], metakey), value
assert getattr(outputs.traits()[key], metakey) == value
5 changes: 2 additions & 3 deletions nipype/algorithms/tests/test_auto_ArtifactDetect.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ...testing import assert_equal
from ..rapidart import ArtifactDetect


Expand Down Expand Up @@ -49,7 +48,7 @@ def test_ArtifactDetect_inputs():

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(inputs.traits()[key], metakey), value
assert getattr(inputs.traits()[key], metakey) == value


def test_ArtifactDetect_outputs():
Expand All @@ -65,4 +64,4 @@ def test_ArtifactDetect_outputs():

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(outputs.traits()[key], metakey), value
assert getattr(outputs.traits()[key], metakey) == value
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ...testing import assert_equal
from ..misc import CalculateNormalizedMoments


Expand All @@ -13,7 +12,7 @@ def test_CalculateNormalizedMoments_inputs():

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(inputs.traits()[key], metakey), value
assert getattr(inputs.traits()[key], metakey) == value


def test_CalculateNormalizedMoments_outputs():
Expand All @@ -23,4 +22,4 @@ def test_CalculateNormalizedMoments_outputs():

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(outputs.traits()[key], metakey), value
assert getattr(outputs.traits()[key], metakey) == value
5 changes: 2 additions & 3 deletions nipype/algorithms/tests/test_auto_ComputeDVARS.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ...testing import assert_equal
from ..confounds import ComputeDVARS


Expand Down Expand Up @@ -35,7 +34,7 @@ def test_ComputeDVARS_inputs():

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(inputs.traits()[key], metakey), value
assert getattr(inputs.traits()[key], metakey) == value


def test_ComputeDVARS_outputs():
Expand All @@ -54,4 +53,4 @@ def test_ComputeDVARS_outputs():

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(outputs.traits()[key], metakey), value
assert getattr(outputs.traits()[key], metakey) == value
5 changes: 2 additions & 3 deletions nipype/algorithms/tests/test_auto_ComputeMeshWarp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ...testing import assert_equal
from ..mesh import ComputeMeshWarp


Expand All @@ -24,7 +23,7 @@ def test_ComputeMeshWarp_inputs():

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(inputs.traits()[key], metakey), value
assert getattr(inputs.traits()[key], metakey) == value


def test_ComputeMeshWarp_outputs():
Expand All @@ -36,4 +35,4 @@ def test_ComputeMeshWarp_outputs():

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(outputs.traits()[key], metakey), value
assert getattr(outputs.traits()[key], metakey) == value
5 changes: 2 additions & 3 deletions nipype/algorithms/tests/test_auto_CreateNifti.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ...testing import assert_equal
from ..misc import CreateNifti


Expand All @@ -17,7 +16,7 @@ def test_CreateNifti_inputs():

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(inputs.traits()[key], metakey), value
assert getattr(inputs.traits()[key], metakey) == value


def test_CreateNifti_outputs():
Expand All @@ -27,4 +26,4 @@ def test_CreateNifti_outputs():

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(outputs.traits()[key], metakey), value
assert getattr(outputs.traits()[key], metakey) == value
5 changes: 2 additions & 3 deletions nipype/algorithms/tests/test_auto_Distance.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ...testing import assert_equal
from ..misc import Distance


Expand All @@ -19,7 +18,7 @@ def test_Distance_inputs():

for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(inputs.traits()[key], metakey), value
assert getattr(inputs.traits()[key], metakey) == value


def test_Distance_outputs():
Expand All @@ -32,4 +31,4 @@ def test_Distance_outputs():

for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
yield assert_equal, getattr(outputs.traits()[key], metakey), value
assert getattr(outputs.traits()[key], metakey) == value
Loading