Skip to content

Commit ea4def1

Browse files
committed
TST: Use tmpdir for Gantt test
1 parent 7272623 commit ea4def1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

nipype/pipeline/plugins/tests/test_callback.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_callback_gantt(tmpdir, plugin):
7272
from nipype.utils.profiler import log_nodes_cb
7373
from nipype.utils.draw_gantt_chart import generate_gantt_chart
7474

75-
log_filename = "callback.log"
75+
log_filename = path.join(tmpdir, "callback.log")
7676
logger = logging.getLogger("callback")
7777
logger.setLevel(logging.DEBUG)
7878
handler = logging.FileHandler(log_filename)
@@ -91,5 +91,7 @@ def test_callback_gantt(tmpdir, plugin):
9191
plugin_args["n_procs"] = 8
9292
wf.run(plugin=plugin, plugin_args=plugin_args)
9393

94-
generate_gantt_chart("callback.log", 1 if plugin == "Linear" else 8)
95-
assert path.exists("callback.log.html")
94+
generate_gantt_chart(
95+
path.join(tmpdir, "callback.log"), 1 if plugin == "Linear" else 8
96+
)
97+
assert path.exists(path.join(tmpdir, "callback.log.html"))

0 commit comments

Comments
 (0)