From 02f485cbc8b8745ee1f581ffc68aecd40a01722f Mon Sep 17 00:00:00 2001 From: Jesko Date: Fri, 24 Aug 2018 12:15:27 +0200 Subject: [PATCH] making import of QtWebEngine in corresponding tests conditional --- tests/unit/browser/webengine/test_webenginetab.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/browser/webengine/test_webenginetab.py b/tests/unit/browser/webengine/test_webenginetab.py index fd2d7bf61..605eff75b 100644 --- a/tests/unit/browser/webengine/test_webenginetab.py +++ b/tests/unit/browser/webengine/test_webenginetab.py @@ -23,8 +23,10 @@ from unittest import mock import logging from PyQt5.QtCore import QObject -from PyQt5.QtWebEngineWidgets import QWebEnginePage, QWebEngineScriptCollection import pytest +QtWebEngineWidgets = pytest.importorskip("PyQt5.QtWebEngineWidgets") +QWebEnginePage = QtWebEngineWidgets.QWebEnginePage +QWebEngineScriptCollection = QtWebEngineWidgets.QWebEngineScriptCollection from qutebrowser.browser.webengine import webenginetab from qutebrowser.browser import greasemonkey