From bd302d376f9c8ece05bf6e3c21b9023ff35f97cd Mon Sep 17 00:00:00 2001 From: Hans Fangohr <hans.fangohr@mpsd.mpg.de> Date: Thu, 1 Jun 2023 17:33:58 +0000 Subject: [PATCH] Revert "Merge branch 'complete-tests-for-run' into 'main'" This reverts merge request !21 --- tests.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tests.py b/tests.py index 7f152da..01bd4da 100644 --- a/tests.py +++ b/tests.py @@ -6,8 +6,6 @@ import os import shutil import subprocess from pathlib import Path -from io import StringIO -import sys import pytest @@ -104,17 +102,6 @@ def test_run_method(tmp_path): with pytest.raises(subprocess.CalledProcessError): 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): """Simulate running preparation of environment. -- GitLab