Convert to QUrl before waiting for the logline
webview uses QUrl to output the url and thus might convert some escape sequences to their unicode characters. If we don't do the same conversions here, we will "miss" the log message and fail the test.
This commit is contained in:
parent
d5bc962046
commit
0c2a285fef
@ -31,7 +31,7 @@ import tempfile
|
||||
|
||||
import yaml
|
||||
import pytest
|
||||
from PyQt5.QtCore import pyqtSignal
|
||||
from PyQt5.QtCore import pyqtSignal, QUrl
|
||||
|
||||
import testprocess # pylint: disable=import-error
|
||||
from qutebrowser.misc import ipc
|
||||
@ -229,6 +229,7 @@ class QuteProc(testprocess.Process):
|
||||
def wait_for_load_finished(self, path, timeout=15000):
|
||||
"""Wait until any tab has finished loading."""
|
||||
url = self._path_to_url(path)
|
||||
url = QUrl(url).toString()
|
||||
pattern = re.compile(
|
||||
r"(load status for <qutebrowser.browser.webview.WebView "
|
||||
r"tab_id=\d+ url='{url}'>: LoadStatus.success|fetch: "
|
||||
|
Loading…
Reference in New Issue
Block a user