File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -235,16 +235,22 @@ class Dcm2niixOutputSpec(TraitedSpec):
235235
236236class Dcm2niix (CommandLine ):
237237 """Uses Chris Rorden's dcm2niix to convert dicom files
238+
238239 Examples
239240 ========
241+
240242 >>> from nipype.interfaces.dcm2nii import Dcm2niix
241243 >>> converter = Dcm2niix()
242244 >>> converter.inputs.source_names = ['functional_1.dcm', 'functional_2.dcm']
243245 >>> converter.inputs.compress = 'i'
244246 >>> converter.inputs.single_file = True
245247 >>> converter.inputs.output_dir = '.'
246- >>> converter.cmdline
247- 'dcm2niix -b y -z i -m n -f %t%p -o . -s y -v n -x n -t n functional_1.dcm'
248+ >>> converter.cmdline # doctest: +SKIP
249+ 'dcm2niix -b y -z i -x n -t n -m n -f %t%p -o . -s y -v n functional_1.dcm'
250+
251+ >>> flags = '-'.join([val.strip() + ' ' for val in sorted(' '.join(converter.cmdline.split()[1:-1]).split('-'))])
252+ >>> flags
253+ ' -b y -f %t%p -m n -o . -s y -t n -v n -x n -z i '
248254 """
249255
250256 input_spec = Dcm2niixInputSpec
Original file line number Diff line number Diff line change @@ -393,7 +393,8 @@ def test_cmdline_profiling(self):
393393
394394 # Assert runtime stats are what was input
395395 self .assertLessEqual (runtime_gb_err , allowed_gb_err , msg = mem_err )
396- self .assertEqual (expected_runtime_threads , runtime_threads , msg = threads_err )
396+ self .assertTrue (abs (expected_runtime_threads - runtime_threads ) <= 1 ,
397+ msg = threads_err )
397398
398399 # Test resources were used as expected
399400 @unittest .skipIf (run_profiler == False , skip_profile_msg )
@@ -434,7 +435,8 @@ def test_function_profiling(self):
434435
435436 # Assert runtime stats are what was input
436437 self .assertLessEqual (runtime_gb_err , allowed_gb_err , msg = mem_err )
437- self .assertEqual (expected_runtime_threads , runtime_threads , msg = threads_err )
438+ self .assertTrue (abs (expected_runtime_threads - runtime_threads ) <= 1 ,
439+ msg = threads_err )
438440
439441
440442# Command-line run-able unittest module
You can’t perform that action at this time.
0 commit comments