Run new qutebrowser instance for each test.
The possibilities how a test can affect another are just too high.
This commit is contained in:
parent
8664e45558
commit
ee8d538964
@ -22,4 +22,4 @@
|
|||||||
"""Things needed for integration testing."""
|
"""Things needed for integration testing."""
|
||||||
|
|
||||||
from webserver import httpbin, httpbin_after_test
|
from webserver import httpbin, httpbin_after_test
|
||||||
from quteprocess import quteproc, quteproc_after_test
|
from quteprocess import quteproc
|
||||||
|
@ -151,17 +151,11 @@ class QuteProc(testprocess.Process):
|
|||||||
self.send_cmd(':open ' + url)
|
self.send_cmd(':open ' + url)
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture(scope='session', autouse=True)
|
@pytest.yield_fixture
|
||||||
def quteproc(qapp, httpbin):
|
def quteproc(qapp, httpbin):
|
||||||
"""Fixture for qutebrowser process."""
|
"""Fixture for qutebrowser process."""
|
||||||
proc = QuteProc(httpbin)
|
proc = QuteProc(httpbin)
|
||||||
proc.start()
|
proc.start()
|
||||||
yield proc
|
yield proc
|
||||||
|
proc.after_test()
|
||||||
proc.cleanup()
|
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()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user