Skip to content

Commit 3a1d1fa

Browse files
committed
updating rtd_requirements.txt and doc/devel/testing_nipype.rst to the pytest testing framework
1 parent 96fde95 commit 3a1d1fa

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

doc/devel/testing_nipype.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ or::
4040
Test 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/>`_.
4444
By the time these guidelines are written, Nipype implements 17638 tests.
4545

4646
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 ::
5050

5151
If ``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
5857
something 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```
6765
environment variable is not set, some FreeSurfer related tests will fail.
6866
If 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
9088
To enable the tests depending on these data, just unpack the targz file and set the :code:`FSL_COURSE_DATA` environment
9189
variable 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

9497
Avoiding 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

120123
For 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

rtd_requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ networkx>=1.7
44
traits>=4.3
55
python-dateutil>=1.5
66
nibabel>=2.0.1
7-
nose>=1.2
7+
pytest>=3.0
8+
pytest-raisesregexp
9+
pytest-cov
810
future==0.15.2
911
simplejson>=3.8.0
1012
prov>=1.4.0
1113
xvfbwrapper
1214
psutil
1315
funcsigs
1416
configparser
15-
doctest-ignore-unicode
1617
matplotlib

0 commit comments

Comments
 (0)