File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,14 @@ def test_command_templating_with_invalid_substitution(template):
3434
3535def test_command_execution (tmpdir : Path ):
3636 outdir = PosixPath (tmpdir )
37- command = Command ("sh" , "-c" , "> {outdir}/created" )
37+ # fmt: off
38+ command = Command (
39+ "python" ,
40+ "-c" ,
41+ "import pathlib\n "
42+ "pathlib.Path('{outdir}/created').touch()" ,
43+ )
44+ # fmt: on
3845
3946 command .extract (Path ("foo" ), outdir )
4047
@@ -43,7 +50,14 @@ def test_command_execution(tmpdir: Path):
4350
4451def test_command_execution_failure (tmpdir : Path ):
4552 outdir = PosixPath (tmpdir )
46- command = Command ("sh" , "-c" , ">&1 echo -n stdout; >&2 echo -n stderr; false" )
53+ command = Command (
54+ "python" ,
55+ "-c" ,
56+ "import sys\n "
57+ "sys.stdout.write('stdout')\n "
58+ "sys.stderr.write('stderr')\n "
59+ "sys.exit(1)" ,
60+ )
4761
4862 with pytest .raises (ExtractError ) as excinfo :
4963 command .extract (Path ("input" ), outdir )
You can’t perform that action at this time.
0 commit comments