@bdd.when(bdd.parsers.re('I wait for (?P<is_regex>regex )?"(?P<pattern>[^"]+)" in the log(?P<do_skip> or skip the test)?'))
def wait_in_log(quteproc, is_regex, pattern, do_skip):
 if is_regex:
  pattern = re.compile(pattern)
 line = quteproc.wait_for(message=pattern, do_skip=bool(do_skip))
 line.expected = True

@ bdd . when ( bdd . parsers . re ( 'I wait for (?P<is_regex>regex )?"(?P<pattern>[^"]+)" in the log(?P<do_skip> or skip the test)?' ) ) def wait_in_log ( quteproc , is_regex , pattern , do_skip ) : if is_regex : pattern = re . compile ( pattern ) line = quteproc . wait_for ( message = pattern , do_skip = bool ( do_skip ) ) line . expected = True
wait for a given pattern in the qutebrowser log .