@@ -22,24 +22,24 @@ def test_main_returns_2_on_empty(self):
2222 with self .assertRaises (SystemExit ) as cm :
2323 with capture_sys_output () as (stdout , stderr ):
2424 nipype_cmd .main (['nipype_cmd' ])
25-
25+
2626 exit_exception = cm .exception
2727 self .assertEqual (exit_exception .code , 2 )
28-
29- self .assertEqual (stderr .getvalue (),
28+
29+ self .assertEqual (stderr .getvalue (),
3030"""usage: nipype_cmd [-h] module interface
3131nipype_cmd: error: too few arguments
3232""" )
3333 self .assertEqual (stdout .getvalue (), '' )
34-
34+
3535 def test_main_returns_0_on_help (self ):
3636 with self .assertRaises (SystemExit ) as cm :
3737 with capture_sys_output () as (stdout , stderr ):
3838 nipype_cmd .main (['nipype_cmd' , '-h' ])
39-
39+
4040 exit_exception = cm .exception
4141 self .assertEqual (exit_exception .code , 0 )
42-
42+
4343 self .assertEqual (stderr .getvalue (), '' )
4444 self .assertEqual (stdout .getvalue (),
4545"""usage: nipype_cmd [-h] module interface
@@ -53,15 +53,15 @@ def test_main_returns_0_on_help(self):
5353optional arguments:
5454 -h, --help show this help message and exit
5555""" )
56-
56+
5757 def test_list_nipy_interfacesp (self ):
5858 with self .assertRaises (SystemExit ) as cm :
5959 with capture_sys_output () as (stdout , stderr ):
6060 nipype_cmd .main (['nipype_cmd' , 'nipype.interfaces.nipy' ])
61-
61+
6262 exit_exception = cm .exception
6363 self .assertEqual (exit_exception .code , 0 )
64-
64+
6565 self .assertEqual (stderr .getvalue (), '' )
6666 self .assertEqual (stdout .getvalue (),
6767"""Available Interfaces:
@@ -77,10 +77,10 @@ def test_run_4d_realign_without_arguments(self):
7777 with self .assertRaises (SystemExit ) as cm :
7878 with capture_sys_output () as (stdout , stderr ):
7979 nipype_cmd .main (['nipype_cmd' , 'nipype.interfaces.nipy' , 'FmriRealign4d' ])
80-
80+
8181 exit_exception = cm .exception
8282 self .assertEqual (exit_exception .code , 2 )
83-
83+
8484 self .assertEqual (stderr .getvalue (),
8585"""usage: nipype_cmd nipype.interfaces.nipy FmriRealign4d [-h]
8686 [--between_loops BETWEEN_LOOPS]
@@ -95,15 +95,15 @@ def test_run_4d_realign_without_arguments(self):
9595nipype_cmd nipype.interfaces.nipy FmriRealign4d: error: too few arguments
9696""" )
9797 self .assertEqual (stdout .getvalue (), '' )
98-
98+
9999 def test_run_4d_realign_help (self ):
100100 with self .assertRaises (SystemExit ) as cm :
101101 with capture_sys_output () as (stdout , stderr ):
102102 nipype_cmd .main (['nipype_cmd' , 'nipype.interfaces.nipy' , 'FmriRealign4d' , '-h' ])
103-
103+
104104 exit_exception = cm .exception
105105 self .assertEqual (exit_exception .code , 0 )
106-
106+
107107 self .assertEqual (stderr .getvalue (), '' )
108108 self .assertTrue ("Run FmriRealign4d" in stdout .getvalue ())
109109
0 commit comments