From 6e390bdc0136ad737b7c71968a83f7dc64a880cf Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 17 Jan 2016 20:46:55 +0100 Subject: [PATCH] tests: Add a quteproc test for quitting. --- tests/integration/test_quteprocess.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/integration/test_quteprocess.py b/tests/integration/test_quteprocess.py index 09645e7fa..409b0e6c2 100644 --- a/tests/integration/test_quteprocess.py +++ b/tests/integration/test_quteprocess.py @@ -69,6 +69,14 @@ def test_qt_log_ignore(qtbot, quteproc): quteproc.send_cmd(':message-error "SpellCheck: test"') +def test_quteprocess_quitting(qtbot, quteproc_process): + """When qutebrowser quits, after_test should fail.""" + with qtbot.waitSignal(quteproc_process.proc.finished): + quteproc_process.send_cmd(':quit') + with pytest.raises(testprocess.ProcessExited): + quteproc_process.after_test() + + @pytest.mark.parametrize('data, attrs', [ ( # Normal message