Fix lint.

This commit is contained in:
Florian Bruhin 2015-10-27 08:07:16 +01:00
parent e88e9a66da
commit 70decdc2c8
2 changed files with 11 additions and 2 deletions

View File

@ -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

View File

@ -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<timestamp>\d\d:\d\d:\d\d)
\ (?P<loglevel>VDEBUG|DEBUG|INFO|WARNING|ERROR)