Skip to content

Commit 6aab778

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nipype/interfaces/tests/test_r.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def test_run_interface(tmpdir):
5151

5252
@pytest.mark.skipif(no_r, reason="R is not available")
5353
def test_set_rcmd(tmpdir):
54-
os.chdir(tmpdir)
54+
cwd = tmpdir.chdir()
5555
default_script_file = r.RInputSpec().script_file
5656

5757
ri = r.RCommand()
@@ -60,3 +60,4 @@ def test_set_rcmd(tmpdir):
6060
assert not os.path.exists(default_script_file), "scriptfile should not exist."
6161
assert ri._cmd == "foo"
6262
ri.set_default_r_cmd(_default_r_cmd)
63+
cwd.chdir()

0 commit comments

Comments
 (0)