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 7
7
absolute_import )
8
8
from builtins import open
9
9
10
- import os
11
-
12
10
from ... import engine as pe
13
11
from ....interfaces import base as nib
14
- from ....interfaces .utility import IdentityInterface
12
+ from ....interfaces .utility import IdentityInterface , Function , Merge
15
13
from ....interfaces .base import traits , File
16
14
17
15
@@ -612,3 +610,20 @@ def nested_wf(i, name='smallwf'):
612
610
# there should be six nodes in total
613
611
assert len (result .nodes ()) == 6 , \
614
612
"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