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

Merge branch 'revert-2b73d043' into 'main'

Revert "Merge branch 'complete-tests-for-run' into 'main'"

See merge request mpsd-cs/mpsd-software-environments!26
parents 2b73d043 bd302d37
No related branches found
No related tags found
1 merge request!26Revert "Merge branch 'complete-tests-for-run' into 'main'"
Pipeline #369060 passed
...@@ -6,8 +6,6 @@ import os ...@@ -6,8 +6,6 @@ import os
import shutil import shutil
import subprocess import subprocess
from pathlib import Path from pathlib import Path
from io import StringIO
import sys
import pytest import pytest
...@@ -104,17 +102,6 @@ def test_run_method(tmp_path): ...@@ -104,17 +102,6 @@ def test_run_method(tmp_path):
with pytest.raises(subprocess.CalledProcessError): with pytest.raises(subprocess.CalledProcessError):
run(["ls", "/doesnotexist"], check=True) run(["ls", "/doesnotexist"], check=True)
# test that the counter works correctly:
# check that ##-08 is printed when run(["echo", "Good Bye, world!"]) is run
# the 8 in ##-08 is present because
# this is the 8th run of the `run` function
stdout_original = sys.stdout # preserve current stdout stream
captured_output = StringIO() # create an in-memory file-like object.
sys.stdout = captured_output # redirect stdout to the file
run(["echo", "Good Bye, world!"])
sys.stdout = stdout_original # restores the original stdout
assert "##-08" in captured_output.getvalue()
def test_prepare_environment(tmp_path): def test_prepare_environment(tmp_path):
"""Simulate running preparation of environment. """Simulate running preparation of environment.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment