Skip to content

Commit f4b94a4

Browse files
committed
make the tests more robust
1 parent a58af1f commit f4b94a4

File tree

1 file changed

+2
-51
lines changed

1 file changed

+2
-51
lines changed

nipype/utils/tests/test_cmd.py

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -105,57 +105,8 @@ def test_run_4d_realign_help(self):
105105
self.assertEqual(exit_exception.code, 0)
106106

107107
self.assertEqual(stderr.getvalue(), '')
108-
self.assertEqual(stdout.getvalue(),
109-
"""usage: nipype_cmd nipype.interfaces.nipy FmriRealign4d [-h]
110-
[--between_loops BETWEEN_LOOPS]
111-
[--ignore_exception IGNORE_EXCEPTION]
112-
[--loops LOOPS]
113-
[--slice_order SLICE_ORDER]
114-
[--speedup SPEEDUP]
115-
[--start START]
116-
[--time_interp TIME_INTERP]
117-
[--tr_slices TR_SLICES]
118-
in_file tr
119-
120-
Run FmriRealign4d
121-
122-
positional arguments:
123-
in_file (a list of items which are an existing file name) File
124-
to realign
125-
tr (a float) TR in seconds
126-
127-
optional arguments:
128-
-h, --help show this help message and exit
129-
--between_loops BETWEEN_LOOPS
130-
(a list of items which are an integer, nipype default
131-
value: [5]) loops used to realign different runs
132-
--ignore_exception IGNORE_EXCEPTION
133-
(a boolean, nipype default value: False) Print an
134-
error message instead of throwing an exception in case
135-
the interface fails to run
136-
--loops LOOPS (a list of items which are an integer, nipype default
137-
value: [5]) loops within each run
138-
--slice_order SLICE_ORDER
139-
(a list of items which are an integer) 0 based slice
140-
order. This would be equivalent to
141-
enteringnp.argsort(spm_slice_order) for this field.
142-
This effectsinterleaved acquisition. This field will
143-
be deprecated infuture Nipy releases and be replaced
144-
by actual sliceacquisition times. requires:
145-
time_interp
146-
--speedup SPEEDUP (a list of items which are an integer, nipype default
147-
value: [5]) successive image sub-sampling factors for
148-
acceleration
149-
--start START (a float, nipype default value: 0.0) time offset into
150-
TR to align slices to
151-
--time_interp TIME_INTERP
152-
(True) Assume smooth changes across time e.g., fmri
153-
series. If you don't want slice timing correction set
154-
this to undefined requires: slice_order
155-
--tr_slices TR_SLICES
156-
(a float) TR slices requires: time_interp
157-
""")
158-
108+
self.assertTrue("loops used to realign different runs" in stdout.getvalue())
109+
self.assertTrue("Run FmriRealign4d" in stdout.getvalue())
159110

160111
if __name__ == '__main__':
161112
unittest.main()

0 commit comments

Comments
 (0)