Skip to content
Snippets Groups Projects

Draft: Add tests for run method

Merged Ashwin Kumar Karnad requested to merge run-tests-for-run into linux-debian11
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
  • a42c72b9
    fix test · a42c72b9
    Hans Fangohr authored
    (behaviour of run is like subprocess.run)
+ 1
1
@@ -36,7 +36,7 @@ def test_run_method(tmp_path):
# ensure single string command works
assert run(("ls -l"), shell=True).returncode == 0
# test spaces are handled correctly:
assert run(["touch", "file1 file2"]).returncode == 0
assert run(["touch", "file1", "file2"]).returncode == 0
assert os.path.exists("file1")
assert os.path.exists("file2")
# test output is captured:
Loading