def test_mapnode_crash3(tmpdir):
 node = pe.MapNode(niu.Function(input_names=[u'WRONG'], output_names=[u'newstring'], function=dummy_func), iterfield=[u'WRONG'], name=u'myfunc')
 node.inputs.WRONG = [u'string{}'.format(i) for i in range(3)]
 wf = pe.Workflow(u'testmapnodecrash')
 wf.add_nodes([node])
 wf.base_dir = str(tmpdir)
 with pytest.raises(RuntimeError):
  wf.run(plugin=u'Linear')

def test_mapnode_crash3 ( tmpdir ) : node = pe . MapNode ( niu . Function ( input_names = [ u'WRONG' ] , output_names = [ u'newstring' ] , function = dummy_func ) , iterfield = [ u'WRONG' ] , name = u'myfunc' ) node . inputs . WRONG = [ u'string{}' . format ( i ) for i in range ( 3 ) ] wf = pe . Workflow ( u'testmapnodecrash' ) wf . add_nodes ( [ node ] ) wf . base_dir = str ( tmpdir ) with pytest . raises ( RuntimeError ) : wf . run ( plugin = u'Linear' )
test mapnode crash when mapnode is embedded in a workflow .