Skip to content

Commit cff71a1

Browse files
committed
changes based on feedback from review
* making configuration changes local instead of global * removed unnecessary statements also: * string quoting (" => ') consistent other tests * catch more general exception to be consistent with other tests
1 parent da686fa commit cff71a1

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

nipype/pipeline/engine/tests/test_engine.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -627,33 +627,28 @@ def func1(in1):
627627

628628

629629
def test_parameterize_dirs_false(tmpdir):
630-
from .... import config
631630
from ....interfaces.utility import IdentityInterface
632631
from ....testing import example_data
633632

634-
config.update_config({'execution': {'parameterize_dirs': False}})
635-
636-
wd = str(tmpdir)
637-
os.chdir(wd)
638-
639633
input_file = example_data('fsl_motion_outliers_fd.txt')
640634

641-
n1 = pe.Node(EngineTestInterface(), name="Node1")
635+
n1 = pe.Node(EngineTestInterface(), name='Node1')
642636
n1.iterables = ('input_file', (input_file, input_file))
643637
n1.interface.inputs.input1 = 1
644638

645-
n2 = pe.Node(IdentityInterface(fields='in1'), name="Node2")
639+
n2 = pe.Node(IdentityInterface(fields='in1'), name='Node2')
646640

647-
wf = pe.Workflow(name="Test")
648-
wf.base_dir = wd
641+
wf = pe.Workflow(name='Test')
642+
wf.base_dir = str(tmpdir)
643+
wf.config['execution']['parameterize_dirs'] = False
649644
wf.connect([(n1, n2, [('output1', 'in1')])])
650645

651646
error_raised = False
652647
try:
653648
wf.run()
654-
except TypeError as typerr:
649+
except Exception as ex:
655650
from nipype.pipeline.engine.base import logger
656-
logger.info('Exception: %s' % str(typerr))
651+
logger.info('Exception: %s' % str(ex))
657652
error_raised = True
658653
assert not error_raised
659654

0 commit comments

Comments
 (0)