File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
nipype/pipeline/engine/tests Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -486,6 +486,28 @@ def func1(in1):
486486 assert "can only concatenate list" in str (excinfo .value )
487487
488488
489+ def test_mapnode_expansion (tmpdir ):
490+ os .chdir (str (tmpdir ))
491+ from nipype import MapNode , Function
492+
493+ def func1 (in1 ):
494+ return in1 + 1
495+
496+ mapnode = MapNode (Function (function = func1 ),
497+ iterfield = 'in1' ,
498+ name = 'mapnode' )
499+ mapnode .inputs .in1 = [1 , 2 ]
500+ mapnode .interface .num_threads = 2
501+ mapnode .interface .estimated_memory_gb = 2
502+
503+ for idx , node in mapnode ._make_nodes ():
504+ for attr in ('overwrite' , 'run_without_submitting' , 'plugin_args' ):
505+ assert getattr (node , attr ) == getattr (mapnode , attr )
506+ for attr in ('num_threads' , 'estimated_memory_gb' ):
507+ assert (getattr (node ._interface , attr ) ==
508+ getattr (mapnode ._interface , attr ))
509+
510+
489511def test_node_hash (tmpdir ):
490512 wd = str (tmpdir )
491513 os .chdir (wd )
You can’t perform that action at this time.
0 commit comments