parent
5c97ec1659
commit
1579f27564
@ -180,6 +180,7 @@ def wait_in_log(quteproc, is_regex, pattern, do_skip):
|
||||
r'"(?P<message>.*)"'))
|
||||
def wait_for_message(quteproc, httpbin, category, message):
|
||||
"""Wait for a given statusbar message/error/warning."""
|
||||
quteproc.log_summary('Waiting for {} "{}"'.format(category, message))
|
||||
expect_message(quteproc, httpbin, category, message)
|
||||
|
||||
|
||||
|
@ -320,6 +320,11 @@ class QuteProc(testprocess.Process):
|
||||
|
||||
def send_cmd(self, command, count=None):
|
||||
"""Send a command to the running qutebrowser instance."""
|
||||
summary = command
|
||||
if count is not None:
|
||||
summary += ' (count {})'.format(count)
|
||||
self._log_summary(summary)
|
||||
|
||||
assert self._ipc_socket is not None
|
||||
|
||||
time.sleep(self._delay / 1000)
|
||||
|
@ -151,6 +151,11 @@ class Process(QObject):
|
||||
print(line)
|
||||
self.captured_log.append(line)
|
||||
|
||||
def _log_summary(self, text):
|
||||
"""Log the given line as summary/title."""
|
||||
text = '\n{line} {text} {line}\n'.format(line='='*50, text=text)
|
||||
self._log(text)
|
||||
|
||||
def _parse_line(self, line):
|
||||
"""Parse the given line from the log.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user