Skip to content
Snippets Groups Projects
Commit 8fe00bf8 authored by Hans Fangohr's avatar Hans Fangohr
Browse files

improve documentation

parent 36cb7edd
No related branches found
No related tags found
2 merge requests!19Move linux-debian11 into main,!14Draft: Add tests for run method
Pipeline #368639 passed
......@@ -26,12 +26,15 @@ def test_os_chdir(tmp_path):
def test_run_method(tmp_path):
"""Run tests for run method."""
run = mod.run
# test a command with options:
assert run(["date", "+%Y-%m-%d"]).returncode == 0
assert run("date +%Y-%m-%d", shell=True).returncode == 0
# tests interacting with the file system
with mod.os_chdir(str(tmp_path)):
# ensure single string command works
assert run(("ls -l"), shell=True).returncode == 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment