Skip to content

Commit f72b510

Browse files
Terfeffigies
andauthored
Update nipype/interfaces/tests/test_r.py
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent b74fc85 commit f72b510

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

nipype/interfaces/tests/test_r.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,15 @@ def clean_workspace_and_get_default_script_file():
2020

2121

2222
@pytest.mark.skipif(no_r, reason="R is not available")
23-
def test_cmdline():
24-
default_script_file = clean_workspace_and_get_default_script_file()
25-
26-
ri = r.RCommand(script="1 + 1", script_file="testscript", rfile=False)
23+
def test_cmdline(tmp_path):
24+
ri = r.RCommand(script="1 + 1", script_file=str(tmp_path / "testscript"), rfile=False)
2725

2826
assert ri.cmdline == r_cmd + (
2927
' -e "1 + 1"'
3028
)
3129

3230
assert ri.inputs.script == "1 + 1"
33-
assert ri.inputs.script_file == "testscript"
31+
assert ri.inputs.script_file == str(tmp_path / "testscript")
3432
assert not os.path.exists(ri.inputs.script_file), "scriptfile should not exist"
3533
assert not os.path.exists(
3634
default_script_file

0 commit comments

Comments
 (0)