diff --git a/tests/integration/features/conftest.py b/tests/integration/features/conftest.py index bffc6b2e4..1208cf42e 100644 --- a/tests/integration/features/conftest.py +++ b/tests/integration/features/conftest.py @@ -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() diff --git a/tests/integration/testprocess.py b/tests/integration/testprocess.py index 79fb5494d..0b527b38b 100644 --- a/tests/integration/testprocess.py +++ b/tests/integration/testprocess.py @@ -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