Run new qutebrowser instance for each test.

The possibilities how a test can affect another are just too high.
This commit is contained in:
Florian Bruhin 2015-10-13 19:38:25 +02:00
parent 8664e45558
commit ee8d538964
2 changed files with 3 additions and 9 deletions

View File

@ -22,4 +22,4 @@
"""Things needed for integration testing."""
from webserver import httpbin, httpbin_after_test
from quteprocess import quteproc, quteproc_after_test
from quteprocess import quteproc

View File

@ -151,17 +151,11 @@ class QuteProc(testprocess.Process):
self.send_cmd(':open ' + url)
@pytest.yield_fixture(scope='session', autouse=True)
@pytest.yield_fixture
def quteproc(qapp, httpbin):
"""Fixture for qutebrowser process."""
proc = QuteProc(httpbin)
proc.start()
yield proc
proc.after_test()
proc.cleanup()
@pytest.yield_fixture(autouse=True)
def quteproc_after_test(quteproc):
"""Fixture to check the status of and restart the qutebrowser process."""
yield
quteproc.after_test()