From 9aa6c8cf36067cf2207ddc418e00f50e0fd0910c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 10 Aug 2016 09:29:10 +0200 Subject: [PATCH] Automatically terminate quteproc_new after a test This means we don't get a QProcess message because of test_no_loglines not sending :quit, and we don't need to do so in test_ascii_locale as there's nothing we need to wait for. --- tests/end2end/fixtures/quteprocess.py | 1 + tests/end2end/test_invocations.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/end2end/fixtures/quteprocess.py b/tests/end2end/fixtures/quteprocess.py index b379b42a5..6469ccf37 100644 --- a/tests/end2end/fixtures/quteprocess.py +++ b/tests/end2end/fixtures/quteprocess.py @@ -624,3 +624,4 @@ def quteproc_new(qapp, httpbin, request): # Not calling before_test here as that would start the process yield proc proc.after_test(did_fail=request.node.rep_call.failed) + proc.terminate() diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py index 840465704..a30be692b 100644 --- a/tests/end2end/test_invocations.py +++ b/tests/end2end/test_invocations.py @@ -98,9 +98,6 @@ def test_ascii_locale(httpbin, tmpdir, quteproc_new): quteproc_new.wait_for(category='downloads', message='Opening * with [*python*]') - quteproc_new.send_cmd(':quit') - quteproc_new.wait_for_quit() - assert len(tmpdir.listdir()) == 1 assert (tmpdir / '?-issue908.bin').exists() @@ -121,5 +118,7 @@ def test_optimize(quteproc_new, capfd, level): "may occur.") line = quteproc_new.wait_for(message=msg) line.expected = True + + # Waiting for quit to make sure no other warning is emitted quteproc_new.send_cmd(':quit') quteproc_new.wait_for_quit()