-
Notifications
You must be signed in to change notification settings - Fork 536
improve python 3 compatibility when parameterize_dirs is False #1764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
caf45d7
e060bbc
9b3b01b
da686fa
cff71a1
212af5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ | |
| class InputSpec(nib.TraitedSpec): | ||
| input1 = nib.traits.Int(desc='a random int') | ||
| input2 = nib.traits.Int(desc='a random int') | ||
|
|
||
| input_file = nib.traits.File(desc='Random File') | ||
|
|
||
| class OutputSpec(nib.TraitedSpec): | ||
| output1 = nib.traits.List(nib.traits.Int, desc='outputs') | ||
|
|
@@ -626,6 +626,38 @@ def func1(in1): | |
| assert not error_raised | ||
|
|
||
|
|
||
| def test_parameterize_dirs_false(tmpdir): | ||
| from .... import config | ||
| from ....interfaces.utility import IdentityInterface | ||
| from ....testing import example_data | ||
|
|
||
| config.update_config({'execution': {'parameterize_dirs': False}}) | ||
|
|
||
| wd = str(tmpdir) | ||
| os.chdir(wd) | ||
|
||
|
|
||
| input_file = example_data('fsl_motion_outliers_fd.txt') | ||
|
|
||
| n1 = pe.Node(EngineTestInterface(), name="Node1") | ||
| n1.iterables = ('input_file', (input_file, input_file)) | ||
| n1.interface.inputs.input1 = 1 | ||
|
|
||
| n2 = pe.Node(IdentityInterface(fields='in1'), name="Node2") | ||
|
|
||
| wf = pe.Workflow(name="Test") | ||
| wf.base_dir = wd | ||
| wf.connect([(n1, n2, [('output1', 'in1')])]) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. local change for wf: |
||
|
|
||
| error_raised = False | ||
| try: | ||
| wf.run() | ||
| except TypeError as typerr: | ||
| from nipype.pipeline.engine.base import logger | ||
| logger.info('Exception: %s' % str(typerr)) | ||
| error_raised = True | ||
| assert not error_raised | ||
|
|
||
|
|
||
| def test_serial_input(tmpdir): | ||
| wd = str(tmpdir) | ||
| os.chdir(wd) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make this a local change rather than a global change.