From 59453cf198848c74e942eb0c3a4fb34d34c54c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Steinkopf=20S=C3=B8hoel?= <49289030+HakonSohoel@users.noreply.github.com> Date: Tue, 5 Nov 2024 12:19:47 +0100 Subject: [PATCH] Fix pytest option typo (#9141) --- tests/ert/conftest.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/ert/conftest.py b/tests/ert/conftest.py index 25b59d7c8fd..59f4b62b868 100644 --- a/tests/ert/conftest.py +++ b/tests/ert/conftest.py @@ -322,6 +322,10 @@ def pytest_collection_modifyitems(config, items): if item.get_closest_marker("requires_window_manager"): item.fixturenames.append("_qt_excepthook") item.fixturenames.append("_qt_add_search_paths") + if item.get_closest_marker("requires_eclipse") and not config.getoption( + "--eclipse-simulator" + ): + item.add_marker(pytest.mark.skip("Requires eclipse")) if config.getoption("--runslow"): # --runslow given in cli: do not skip slow tests @@ -331,20 +335,11 @@ def pytest_collection_modifyitems(config, items): for item in items: if "quick_only" in item.keywords: item.add_marker(skip_quick) - if item.get_closest_marker("requires_eclipse") and not config.getoption( - "--eclipse_simulator" - ): - item.add_marker(pytest.mark.skip("Requires eclipse")) - else: skip_slow = pytest.mark.skip(reason="need --runslow option to run") for item in items: if "slow" in item.keywords: item.add_marker(skip_slow) - if item.get_closest_marker("requires_eclipse") and not config.getoption( - "--eclipse-simulator" - ): - item.add_marker(pytest.mark.skip("Requires eclipse")) def _run_snake_oil(source_root):