40
40
Test implementation
41
41
-------------------
42
42
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/ >`_.
44
44
By the time these guidelines are written, Nipype implements 17638 tests.
45
45
46
46
After 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 ::
50
50
51
51
If ``make `` is not installed in the system, it is possible to run the tests using::
52
52
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
55
54
56
55
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
58
57
something like::
59
58
60
59
----------------------------------------------------------------------
61
- Ran 17922 tests in 107.254s
60
+ 2445 passed, 41 skipped, 7 xfailed in 1277.66 seconds
62
61
63
- OK (SKIP=27)
64
62
65
63
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` ``
67
65
environment variable is not set, some FreeSurfer related tests will fail.
68
66
If any of the tests failed, please report them on our `bug tracker
69
67
<http://github.com/nipy/nipype/issues> `_.
@@ -90,6 +88,11 @@ Some tests in Nipype make use of some images distributed within the `FSL course
90
88
To enable the tests depending on these data, just unpack the targz file and set the :code: `FSL_COURSE_DATA ` environment
91
89
variable to point to that folder.
92
90
91
+ Xfail tests
92
+ ~~~~~~~~~~
93
+
94
+ Some tests are expect to fail until the code will be changed or for other reasons.
95
+
93
96
94
97
Avoiding any MATLAB calls from testing
95
98
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -115,7 +118,7 @@ Nipype is as easy as follows::
115
118
-v ~/examples:/root/examples:ro \
116
119
-v ~/scratch:/scratch \
117
120
-w /root/src/nipype \
118
- nipype/nipype_test:py27 /usr/bin/run_nosetests .sh
121
+ nipype/nipype_test:py27 /usr/bin/run_pytest .sh
119
122
120
123
For running nipype in Python 3.5::
121
124
@@ -126,4 +129,4 @@ For running nipype in Python 3.5::
126
129
-v ~/examples:/root/examples:ro \
127
130
-v ~/scratch:/scratch \
128
131
-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