File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -20,17 +20,15 @@ def clean_workspace_and_get_default_script_file():
20
20
21
21
22
22
@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 )
27
25
28
26
assert ri .cmdline == r_cmd + (
29
27
' -e "1 + 1"'
30
28
)
31
29
32
30
assert ri .inputs .script == "1 + 1"
33
- assert ri .inputs .script_file == "testscript"
31
+ assert ri .inputs .script_file == str ( tmp_path / "testscript" )
34
32
assert not os .path .exists (ri .inputs .script_file ), "scriptfile should not exist"
35
33
assert not os .path .exists (
36
34
default_script_file
You can’t perform that action at this time.
0 commit comments