File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
nipype/interfaces/base/tests Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 5
5
import simplejson as json
6
6
7
7
import pytest
8
+ from unittest import mock
8
9
9
10
from .... import config
10
11
from ....testing import example_data
@@ -456,17 +457,18 @@ def test_global_CommandLine_output(tmpdir):
456
457
ci = BET ()
457
458
assert ci .terminal_output == "stream" # default case
458
459
459
- nib .CommandLine .set_default_terminal_output ("allatonce" )
460
- ci = nib .CommandLine (command = "ls -l" )
461
- assert ci .terminal_output == "allatonce"
460
+ with mock .patch .object (nib .CommandLine , '_terminal_output' ):
461
+ nib .CommandLine .set_default_terminal_output ("allatonce" )
462
+ ci = nib .CommandLine (command = "ls -l" )
463
+ assert ci .terminal_output == "allatonce"
462
464
463
- nib .CommandLine .set_default_terminal_output ("file" )
464
- ci = nib .CommandLine (command = "ls -l" )
465
- assert ci .terminal_output == "file"
465
+ nib .CommandLine .set_default_terminal_output ("file" )
466
+ ci = nib .CommandLine (command = "ls -l" )
467
+ assert ci .terminal_output == "file"
466
468
467
- # Check default affects derived interfaces
468
- ci = BET ()
469
- assert ci .terminal_output == "file"
469
+ # Check default affects derived interfaces
470
+ ci = BET ()
471
+ assert ci .terminal_output == "file"
470
472
471
473
472
474
def test_CommandLine_prefix (tmpdir ):
You can’t perform that action at this time.
0 commit comments