diff options
Diffstat (limited to 'tests/end2end/fixtures/quteprocess.py')
-rw-r--r-- | tests/end2end/fixtures/quteprocess.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/end2end/fixtures/quteprocess.py b/tests/end2end/fixtures/quteprocess.py index ab8f28d26..311bbbb4e 100644 --- a/tests/end2end/fixtures/quteprocess.py +++ b/tests/end2end/fixtures/quteprocess.py @@ -33,13 +33,12 @@ import json import yaml import pytest -from PyQt5.QtCore import pyqtSignal, QUrl, QPoint -from PyQt5.QtGui import QImage, QColor from qutebrowser.misc import ipc from qutebrowser.utils import log, utils, javascript from helpers import testutils from end2end.fixtures import testprocess +from qutebrowser.qt import QtGui, QtCore instance_counter = itertools.count() @@ -462,7 +461,7 @@ class QuteProc(testprocess.Process): got_error: Emitted when there was an error log line. """ - got_error = pyqtSignal() + got_error = QtCore.pyqtSignal() KEYS = ['timestamp', 'loglevel', 'category', 'module', 'function', 'line', 'message'] @@ -842,14 +841,14 @@ class QuteProc(testprocess.Process): else: timeout = 5000 - qurl = QUrl(url) + qurl = QtCore.QUrl(url) if not qurl.isValid(): raise ValueError("Invalid URL {}: {}".format(url, qurl.errorString())) # We really need the same representation that the webview uses in # its __repr__ - url = utils.elide(qurl.toDisplayString(QUrl.EncodeUnicode), 100) + url = utils.elide(qurl.toDisplayString(QtCore.QUrl.EncodeUnicode), 100) assert url pattern = re.compile( @@ -903,9 +902,9 @@ class QuteProc(testprocess.Process): def get_screenshot( self, *, - probe_pos: QPoint = None, - probe_color: QColor = testutils.Color(0, 0, 0), - ) -> QImage: + probe_pos: QtCore.QPoint = None, + probe_color: QtGui.QColor = testutils.Color(0, 0, 0), + ) -> QtGui.QImage: """Get a screenshot of the current page. Arguments: @@ -923,7 +922,7 @@ class QuteProc(testprocess.Process): self.wait_for(message=screenshot_msg) print(screenshot_msg) - img = QImage(str(path)) + img = QtGui.QImage(str(path)) assert not img.isNull() if probe_pos is None: |