bdd: Handle trailing slash for URLs loaded.

For some reason, older Qt versions (Debian Jessie/Ubuntu Trusty) like to add a
/, so we need to handle that case too.
This commit is contained in:
Florian Bruhin 2016-01-06 23:19:04 +01:00
parent a2c3f8c402
commit 16ec035418

View File

@ -204,8 +204,10 @@ def path_should_be_loaded(quteproc, path):
page could be loaded from local cache. page could be loaded from local cache.
""" """
url = quteproc.path_to_url(path) url = quteproc.path_to_url(path)
pattern = ("load status for <qutebrowser.browser.webview.WebView tab_id=* " pattern = re.compile(
"url='{}'>: LoadStatus.success".format(url)) r"load status for <qutebrowser\.browser\.webview\.WebView "
r"tab_id=\d+ url='{url}/?'>: LoadStatus\.success".format(
url=re.escape(url)))
quteproc.wait_for(message=pattern) quteproc.wait_for(message=pattern)