1
+ .. _dev_testing_nipype :
2
+
1
3
==============
2
4
Testing nipype
3
5
==============
@@ -14,25 +16,69 @@ If both batteries of tests are passing, the following badges should be shown in
14
16
:target: https://circleci.com/gh/nipy/nipype/tree/master
15
17
16
18
17
- Tests implementation
18
- --------------------
19
+ Installation for developers
20
+ ---------------------------
21
+
22
+ To check out the latest development version::
23
+
24
+ git clone https://github.com/nipy/nipype.git
25
+
26
+ After cloning::
27
+
28
+ cd nipype
29
+ pip install -r requirements.txt
30
+ python setup.py develop
31
+
32
+ or::
33
+
34
+ cd nipype
35
+ pip install -r requirements.txt
36
+ pip install -e .[tests]
37
+
38
+
39
+
40
+ Test implementation
41
+ -------------------
19
42
20
43
Nipype testing framework is built upon `nose <http://nose.readthedocs.io/en/latest/ >`_.
21
44
By the time these guidelines are written, Nipype implements 17638 tests.
22
45
23
- To run the tests locally, first get nose installed::
46
+ After installation in developer mode, the tests can be run with the
47
+ following simple command at the root folder of the project ::
48
+
49
+ make tests
24
50
25
- pip install nose
51
+ If `` make `` is not installed in the system, it is possible to run the tests using::
26
52
53
+ python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest \
54
+ --with-doctest-ignore-unicode --logging-level=DEBUG --verbosity=3 nipype
27
55
28
- Then, after nipype is `installed in developer mode <../users/install.html#nipype-for-developers >`_,
29
- the tests can be run with the following simple command::
30
56
31
- make tests
57
+ A successful test run should complete in a few minutes and end with
58
+ something like::
32
59
60
+ ----------------------------------------------------------------------
61
+ Ran 17922 tests in 107.254s
62
+
63
+ OK (SKIP=27)
64
+
65
+
66
+ All tests should pass (unless you're missing a dependency). If the ``SUBJECTS_DIR` ``
67
+ environment variable is not set, some FreeSurfer related tests will fail.
68
+ If any of the tests failed, please report them on our `bug tracker
69
+ <http://github.com/nipy/nipype/issues> `_.
70
+
71
+ On Debian systems, set the following environment variable before running
72
+ tests::
73
+
74
+ export MATLABCMD=$pathtomatlabdir/bin/$platform/MATLAB
75
+
76
+ where ``$pathtomatlabdir `` is the path to your matlab installation and
77
+ ``$platform `` is the directory referring to x86 or x64 installations
78
+ (typically ``glnxa64 `` on 64-bit installations).
33
79
34
80
Skip tests
35
- ----------
81
+ ~~~~~~~~~~
36
82
37
83
Nipype will skip some tests depending on the currently available software and data
38
84
dependencies. Installing software dependencies and downloading the necessary data
@@ -45,6 +91,16 @@ To enable the tests depending on these data, just unpack the targz file and set
45
91
variable to point to that folder.
46
92
47
93
94
+ Avoiding any MATLAB calls from testing
95
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96
+
97
+ On unix systems, set an empty environment variable::
98
+
99
+ export NIPYPE_NO_MATLAB=
100
+
101
+ This will skip any tests that require matlab.
102
+
103
+
48
104
Testing Nipype using Docker
49
105
---------------------------
50
106
0 commit comments