From 7b93a432b03748196a1adbc4dc04e96fbd284242 Mon Sep 17 00:00:00 2001 From: guahki Date: Sat, 10 Feb 2024 13:56:48 +0100 Subject: [PATCH] Fix failing tests by deleting no longer relevant tests --- tests/test_util.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 tests/test_util.py diff --git a/tests/test_util.py b/tests/test_util.py deleted file mode 100644 index f013782c5f..0000000000 --- a/tests/test_util.py +++ /dev/null @@ -1,26 +0,0 @@ -import sys - -import pytest # type: ignore - -from pipx import util -from pipx.util import run_subprocess - - -@pytest.mark.skipif(sys.platform.startswith("win"), reason="Path resolution skip if not on windows") -def test_executable_path_resolution_unix(): - cmd = ["python99.99", "-c", "import sys;"] - try: - run_subprocess(cmd) - except FileNotFoundError as e: - assert "No such file or directory: 'python99.99'" in str(e) - - -@pytest.mark.skipif(sys.platform.startswith("win"), reason="Path resolution skip if not on windows") -def test_executable_path_resolution_fails_on_unix_if_not_skipped(monkeypatch: pytest.MonkeyPatch): - cmd = ["python99.99", "-c", "import sys;"] - monkeypatch.setattr(util, "WINDOWS", True) - monkeypatch.chdir("./tests") - try: - run_subprocess(cmd) - except FileNotFoundError as e: - assert "tests/python99.99'" in str(e)