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.
This commit is contained in:
toofar 2024-11-23 12:13:58 +13:00
parent 66759c7172
commit 77c880544f
1 changed files with 5 additions and 1 deletions

View File

@ -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()