Skip to content

Commit 4e37641

Browse files
committed
run test in temp directory
1 parent 6949323 commit 4e37641

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

nipype/pipeline/plugins/tests/test_callback.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ def callback(self, node, status, result=None):
3131

3232

3333
def 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

4951
def 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

6771
def 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

Comments
 (0)