4040Test implementation
4141-------------------
4242
43- Nipype testing framework is built upon `nose <http://nose.readthedocs.io /en/latest/ >`_.
43+ Nipype testing framework is built upon `pytest <http://doc.pytest.org /en/latest/ >`_.
4444By the time these guidelines are written, Nipype implements 17638 tests.
4545
4646After installation in developer mode, the tests can be run with the
@@ -50,20 +50,18 @@ following simple command at the root folder of the project ::
5050
5151If ``make `` is not installed in the system, it is possible to run the tests using::
5252
53- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest \
54- --with-doctest-ignore-unicode --logging-level=DEBUG --verbosity=3 nipype
53+ py.test --doctest-modules --cov=nipype nipype
5554
5655
57- A successful test run should complete in a few minutes and end with
56+ A successful test run should complete in 10-30 minutes and end with
5857something like::
5958
6059 ----------------------------------------------------------------------
61- Ran 17922 tests in 107.254s
60+ 2445 passed, 41 skipped, 7 xfailed in 1277.66 seconds
6261
63- OK (SKIP=27)
6462
6563
66- All tests should pass (unless you're missing a dependency). If the ``SUBJECTS_DIR` ``
64+ No test should fail (unless you're missing a dependency). If the ``SUBJECTS_DIR` ``
6765environment variable is not set, some FreeSurfer related tests will fail.
6866If any of the tests failed, please report them on our `bug tracker
6967<http://github.com/nipy/nipype/issues> `_.
@@ -90,6 +88,11 @@ Some tests in Nipype make use of some images distributed within the `FSL course
9088To enable the tests depending on these data, just unpack the targz file and set the :code: `FSL_COURSE_DATA ` environment
9189variable to point to that folder.
9290
91+ Xfail tests
92+ ~~~~~~~~~~
93+
94+ Some tests are expect to fail until the code will be changed or for other reasons.
95+
9396
9497Avoiding any MATLAB calls from testing
9598~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -115,7 +118,7 @@ Nipype is as easy as follows::
115118 -v ~/examples:/root/examples:ro \
116119 -v ~/scratch:/scratch \
117120 -w /root/src/nipype \
118- nipype/nipype_test:py27 /usr/bin/run_nosetests .sh
121+ nipype/nipype_test:py27 /usr/bin/run_pytest .sh
119122
120123For running nipype in Python 3.5::
121124
@@ -126,4 +129,4 @@ For running nipype in Python 3.5::
126129 -v ~/examples:/root/examples:ro \
127130 -v ~/scratch:/scratch \
128131 -w /root/src/nipype \
129- nipype/nipype_test:py35 /usr/bin/run_nosetests .sh
132+ nipype/nipype_test:py35 /usr/bin/run_pytest .sh
0 commit comments