Use raising=True for QtBot.waitSignal.

This commit is contained in:
Florian Bruhin 2015-06-07 02:30:36 +02:00
parent aa4cb2927d
commit e86a79740a
2 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ class JSTester:
def scroll_anchor(self, name):
"""Scroll the main frame to the given anchor."""
page = self.webview.page()
with self._qtbot.waitSignal(page.scrollRequested):
with self._qtbot.waitSignal(page.scrollRequested, raising=True):
page.mainFrame().scrollToAnchor(name)
def load(self, path, **kwargs):
@ -92,7 +92,7 @@ class JSTester:
**kwargs: Passed to jinja's template.render().
"""
template = self._jinja_env.get_template(path)
with self._qtbot.waitSignal(self.webview.loadFinished):
with self._qtbot.waitSignal(self.webview.loadFinished, raising=True):
self.webview.setHtml(template.render(**kwargs))
def run_file(self, filename):

View File

@ -213,7 +213,7 @@ class TestInitLog:
@pytest.fixture
def args(self):
"""Fixture providing an argparse namespace."""
"""Fixture providing an argparse namespace for init_log."""
return argparse.Namespace(debug=True, loglevel=logging.DEBUG,
color=True, loglines=10, logfilter="")