@@ -31,6 +31,8 @@ def callback(self, node, status, result=None):
31
31
32
32
33
33
def test_callback_normal (tmpdir ):
34
+ tmpdir .chdir ()
35
+
34
36
so = Status ()
35
37
wf = pe .Workflow (name = 'test' , base_dir = tmpdir .strpath )
36
38
f_node = pe .Node (niu .Function (function = func , input_names = [],
@@ -47,6 +49,8 @@ def test_callback_normal(tmpdir):
47
49
48
50
49
51
def test_callback_exception (tmpdir ):
52
+ tmpdir .chdir ()
53
+
50
54
so = Status ()
51
55
wf = pe .Workflow (name = 'test' , base_dir = tmpdir .strpath )
52
56
f_node = pe .Node (niu .Function (function = bad_func , input_names = [],
@@ -65,8 +69,10 @@ def test_callback_exception(tmpdir):
65
69
assert so .statuses [1 ][1 ] == 'exception'
66
70
67
71
def test_callback_multiproc_normal (tmpdir ):
72
+ tmpdir .chdir ()
73
+
68
74
so = Status ()
69
- wf = pe .Workflow (name = 'test' , base_dir = tmpdir . strpath )
75
+ wf = pe .Workflow (name = 'test' )
70
76
f_node = pe .Node (niu .Function (function = func , input_names = [],
71
77
output_names = []),
72
78
name = 'f_node' )
@@ -89,6 +95,8 @@ def test_callback_multiproc_exception(tmpdir):
89
95
output_names = []),
90
96
name = 'f_node' )
91
97
wf .add_nodes ([f_node ])
98
+ wf .config ['execution' ] = {'crashdump_dir' : wf .base_dir }
99
+
92
100
try :
93
101
wf .run (plugin = 'MultiProc' ,
94
102
plugin_args = {'status_callback' : so .callback })
0 commit comments