From 70decdc2c895ad72a79d8dc707c713e0e4d50956 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 27 Oct 2015 08:07:16 +0100 Subject: [PATCH] Fix lint. --- tests/integration/features/test_features.py | 4 ++-- tests/integration/quteprocess.py | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/integration/features/test_features.py b/tests/integration/features/test_features.py index 7496a9fb0..2ea25316c 100644 --- a/tests/integration/features/test_features.py +++ b/tests/integration/features/test_features.py @@ -49,7 +49,7 @@ def run_command(quteproc, command): @bdd.when(bdd.parsers.parse("I reload")) -def run_command(qtbot, httpbin, quteproc, command): +def reload(qtbot, httpbin, quteproc, command): with qtbot.waitSignal(httpbin.new_request, raising=True): quteproc.send_cmd(':reload') @@ -61,7 +61,7 @@ def path_should_be_loaded(httpbin, path): @bdd.then(bdd.parsers.parse("The requests should be:\n{pages}")) -def lost_of_loaded_pages(httpbin, pages): +def list_of_loaded_pages(httpbin, pages): requests = [httpbin.Request('GET', '/' + path.strip()) for path in pages.split('\n')] assert httpbin.get_requests() == requests diff --git a/tests/integration/quteprocess.py b/tests/integration/quteprocess.py index b6d6b3067..6f45c8afa 100644 --- a/tests/integration/quteprocess.py +++ b/tests/integration/quteprocess.py @@ -43,6 +43,15 @@ class NoLineMatch(Exception): class LogLine: + """A parsed line from the qutebrowser log output. + + Attributes: + timestamp/loglevel/category/module/function/line/message: + Parsed from the log output. + _line: The entire unparsed line. + expected: Whether the message was expected or not. + """ + LOG_RE = re.compile(r""" (?P\d\d:\d\d:\d\d) \ (?PVDEBUG|DEBUG|INFO|WARNING|ERROR)