tests: Add testprocess.wait_for_quit.
This was in conftest.py before, but we might want to use it outside of that as well.
This commit is contained in:
parent
ef17c86586
commit
d3f0c27a87
@ -465,6 +465,4 @@ def clipboard_contains_multiline(qtbot, qapp, content):
|
||||
|
||||
@bdd.then("qutebrowser should quit")
|
||||
def should_quit(qtbot, quteproc):
|
||||
quteproc.exit_expected = True
|
||||
with qtbot.waitSignal(quteproc.proc.finished, timeout=15000):
|
||||
pass
|
||||
quteproc.wait_for_quit()
|
||||
|
@ -417,3 +417,9 @@ class Process(QObject):
|
||||
return
|
||||
else:
|
||||
raise BlacklistedMessageError(line)
|
||||
|
||||
def wait_for_quit(self):
|
||||
"""Wait until the process has quit."""
|
||||
self.exit_expected = True
|
||||
with self._wait_signal(self.proc.finished, timeout=15000):
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user