File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
nipype/pipeline/engine/tests Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 77 absolute_import )
88from builtins import open
99
10- import os
11-
1210from ... import engine as pe
1311from ....interfaces import base as nib
14- from ....interfaces .utility import IdentityInterface
12+ from ....interfaces .utility import IdentityInterface , Function , Merge
1513from ....interfaces .base import traits , File
1614
1715
@@ -612,3 +610,20 @@ def nested_wf(i, name='smallwf'):
612610 # there should be six nodes in total
613611 assert len (result .nodes ()) == 6 , \
614612 "The number of expanded nodes is incorrect."
613+
614+
615+ def test_name_prefix_join (tmpdir ):
616+ tmpdir .chdir ()
617+
618+ def sq (x ):
619+ return x ** 2
620+
621+ wf = pe .Workflow ('wf' , base_dir = tmpdir .strpath )
622+ square = pe .Node (Function (function = sq ), name = 'square' )
623+ square .iterables = [('x' , [1 , 2 ])]
624+ square_join = pe .JoinNode (Merge (1 , ravel_inputs = True ),
625+ name = 'square_join' ,
626+ joinsource = square ,
627+ joinfield = ['in1' ])
628+ wf .connect (square , 'out' , square_join , "in1" )
629+ wf .run ()
You can’t perform that action at this time.
0 commit comments