@@ -31,6 +31,8 @@ def callback(self, node, status, result=None):
3131
3232
3333def test_callback_normal (tmpdir ):
34+ tmpdir .chdir ()
35+
3436 so = Status ()
3537 wf = pe .Workflow (name = 'test' , base_dir = tmpdir .strpath )
3638 f_node = pe .Node (niu .Function (function = func , input_names = [],
@@ -47,6 +49,8 @@ def test_callback_normal(tmpdir):
4749
4850
4951def test_callback_exception (tmpdir ):
52+ tmpdir .chdir ()
53+
5054 so = Status ()
5155 wf = pe .Workflow (name = 'test' , base_dir = tmpdir .strpath )
5256 f_node = pe .Node (niu .Function (function = bad_func , input_names = [],
@@ -65,8 +69,10 @@ def test_callback_exception(tmpdir):
6569 assert so .statuses [1 ][1 ] == 'exception'
6670
6771def test_callback_multiproc_normal (tmpdir ):
72+ tmpdir .chdir ()
73+
6874 so = Status ()
69- wf = pe .Workflow (name = 'test' , base_dir = tmpdir . strpath )
75+ wf = pe .Workflow (name = 'test' )
7076 f_node = pe .Node (niu .Function (function = func , input_names = [],
7177 output_names = []),
7278 name = 'f_node' )
@@ -89,6 +95,8 @@ def test_callback_multiproc_exception(tmpdir):
8995 output_names = []),
9096 name = 'f_node' )
9197 wf .add_nodes ([f_node ])
98+ wf .config ['execution' ] = {'crashdump_dir' : wf .base_dir }
99+
92100 try :
93101 wf .run (plugin = 'MultiProc' ,
94102 plugin_args = {'status_callback' : so .callback })
0 commit comments