25
25
def test_1mod (iterables , expected ):
26
26
pipe = pe .Workflow (name = "pipe" )
27
27
mod1 = pe .Node (interface = EngineTestInterface (), name = "mod1" )
28
- setattr ( mod1 , " iterables" , iterables ["1" ])
28
+ mod1 . iterables = iterables ["1" ]
29
29
pipe .add_nodes ([mod1 ])
30
30
pipe ._flatgraph = pipe ._create_flat_graph ()
31
31
pipe ._execgraph = pe .generate_expanded_graph (deepcopy (pipe ._flatgraph ))
@@ -49,7 +49,7 @@ def test_2mods(iterables, expected):
49
49
mod1 = pe .Node (interface = EngineTestInterface (), name = "mod1" )
50
50
mod2 = pe .Node (interface = EngineTestInterface (), name = "mod2" )
51
51
for nr in ["1" , "2" ]:
52
- setattr ( eval ("mod" + nr ), " iterables" , iterables [nr ])
52
+ eval ("mod" + nr ). iterables = iterables [nr ]
53
53
pipe .connect ([(mod1 , mod2 , [("output1" , "input2" )])])
54
54
pipe ._flatgraph = pipe ._create_flat_graph ()
55
55
pipe ._execgraph = pe .generate_expanded_graph (deepcopy (pipe ._flatgraph ))
@@ -87,7 +87,7 @@ def test_3mods(iterables, expected, connect):
87
87
mod2 = pe .Node (interface = EngineTestInterface (), name = "mod2" )
88
88
mod3 = pe .Node (interface = EngineTestInterface (), name = "mod3" )
89
89
for nr in ["1" , "2" , "3" ]:
90
- setattr ( eval ("mod" + nr ), " iterables" , iterables [nr ])
90
+ eval ("mod" + nr ). iterables = iterables [nr ]
91
91
if connect == ("1-2" , "2-3" ):
92
92
pipe .connect (
93
93
[
0 commit comments