From 77c880544ff84d3792a84d81d5f4408cfec13ab5 Mon Sep 17 00:00:00 2001 From: toofar Date: Sat, 23 Nov 2024 12:13:58 +1300 Subject: [PATCH] fix test for webkit Was getting an import error when trying to import the webengine version. Not going to skip the tests using this step since they seemed to be working otherwise, probably this behavior isn't needed on webkit anyway. --- tests/end2end/features/test_prompts_bdd.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/end2end/features/test_prompts_bdd.py b/tests/end2end/features/test_prompts_bdd.py index 26c12fd1a..9297d1d29 100644 --- a/tests/end2end/features/test_prompts_bdd.py +++ b/tests/end2end/features/test_prompts_bdd.py @@ -8,7 +8,10 @@ import pytest_bdd as bdd bdd.scenarios('prompts.feature') from qutebrowser.utils import qtutils -from qutebrowser.qt.webenginecore import PYQT_WEBENGINE_VERSION +try: + from qutebrowser.qt.webenginecore import PYQT_WEBENGINE_VERSION +except ImportError: + PYQT_WEBENGINE_VERSION = None @bdd.when("I load an SSL page") @@ -48,6 +51,7 @@ def fresh_instance(quteproc): # browser to make it forget previous prompts. if ( qtutils.version_check("6.8", compiled=False) + and PYQT_WEBENGINE_VERSION and PYQT_WEBENGINE_VERSION < 0x60800 ): quteproc.terminate()