From 4f3c800d9759d296b2b5c630d6bec43a47b334a3 Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Tue, 17 Oct 2023 15:38:23 -0700 Subject: [PATCH] delete failing test_not_installed_version --- tests/test_version.py | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/tests/test_version.py b/tests/test_version.py index a3b5b6ea..b5b2bd5e 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -1,35 +1,9 @@ import re -import pytest - - -@pytest.fixture -def uninstall_jobflow(monkeypatch): - import pkg_resources - - original_func = pkg_resources.get_distribution - - def mock_func(name): - if name == "jobflow": - raise pkg_resources.DistributionNotFound() - return original_func(name) - - monkeypatch.setattr(pkg_resources, "get_distribution", mock_func) - def test_installed_version(): + import jobflow._version from jobflow import __version__ assert re.match(r"^\d+\.\d+\.\d+$", __version__) - - -def test_not_installed_version(uninstall_jobflow): - import importlib - - from jobflow import _version - - # reimport modules - importlib.reload(_version) - - # test version - assert _version.__version__ == "" + assert __version__ == jobflow._version.__version__