|
22 | 22 | class InputSpec(nib.TraitedSpec):
|
23 | 23 | input1 = nib.traits.Int(desc='a random int')
|
24 | 24 | input2 = nib.traits.Int(desc='a random int')
|
25 |
| - |
| 25 | + input_file = nib.traits.File(desc='Random File') |
26 | 26 |
|
27 | 27 | class OutputSpec(nib.TraitedSpec):
|
28 | 28 | output1 = nib.traits.List(nib.traits.Int, desc='outputs')
|
@@ -626,6 +626,33 @@ def func1(in1):
|
626 | 626 | assert not error_raised
|
627 | 627 |
|
628 | 628 |
|
| 629 | +def test_parameterize_dirs_false(tmpdir): |
| 630 | + from ....interfaces.utility import IdentityInterface |
| 631 | + from ....testing import example_data |
| 632 | + |
| 633 | + input_file = example_data('fsl_motion_outliers_fd.txt') |
| 634 | + |
| 635 | + n1 = pe.Node(EngineTestInterface(), name='Node1') |
| 636 | + n1.iterables = ('input_file', (input_file, input_file)) |
| 637 | + n1.interface.inputs.input1 = 1 |
| 638 | + |
| 639 | + n2 = pe.Node(IdentityInterface(fields='in1'), name='Node2') |
| 640 | + |
| 641 | + wf = pe.Workflow(name='Test') |
| 642 | + wf.base_dir = str(tmpdir) |
| 643 | + wf.config['execution']['parameterize_dirs'] = False |
| 644 | + wf.connect([(n1, n2, [('output1', 'in1')])]) |
| 645 | + |
| 646 | + error_raised = False |
| 647 | + try: |
| 648 | + wf.run() |
| 649 | + except TypeError as typerr: |
| 650 | + from nipype.pipeline.engine.base import logger |
| 651 | + logger.info('Exception: %s' % str(typerr)) |
| 652 | + error_raised = True |
| 653 | + assert not error_raised |
| 654 | + |
| 655 | + |
629 | 656 | def test_serial_input(tmpdir):
|
630 | 657 | wd = str(tmpdir)
|
631 | 658 | os.chdir(wd)
|
|
0 commit comments