From d988fee44aef87857259bc47f5cab8f5fc051b08 Mon Sep 17 00:00:00 2001 From: AlexV Date: Thu, 29 Jan 2026 15:52:24 +0100 Subject: [PATCH] [change] Handle skipped tests in SeleniumTestMixin --- openwisp_utils/tests/selenium.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openwisp_utils/tests/selenium.py b/openwisp_utils/tests/selenium.py index d1ebc970..a8f2dac2 100644 --- a/openwisp_utils/tests/selenium.py +++ b/openwisp_utils/tests/selenium.py @@ -53,6 +53,13 @@ def _setup_and_call(self, result, debug=False): stream=None, descriptions=None, verbosity=0 ) super()._setup_and_call(result, debug) + # IMPORTANT: a skip is not a success; propagate it as a skip and stop. + if getattr(result, "skipped", None): + for _, reason in result.skipped: + original_result.addSkip(self, reason) + if hasattr(original_result, "events") and hasattr(result, "events"): + original_result.events = result.events + return if result.wasSuccessful(): if attempt == 0: original_result.addSuccess(self)