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.
This commit is contained in:
Florian Bruhin 2016-08-10 09:29:10 +02:00
parent a24391d40d
commit 9aa6c8cf36
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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()