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():
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
You can’t perform that action at this time.
0 commit comments