tests: Set some settings for quteproc
We set ui -> message-timeout to 0 to get better error messages in the log output and network -> ssl-strict to not hang on unexpected SSL errors.
This commit is contained in:
parent
6ec6657641
commit
d385206ea0
@ -297,6 +297,15 @@ class QuteProc(testprocess.Process):
|
||||
if skip_texts:
|
||||
pytest.skip(', '.join(skip_texts))
|
||||
|
||||
def _after_start(self):
|
||||
"""Adjust some qutebrowser settings after starting."""
|
||||
settings = [
|
||||
('ui', 'message-timeout', '0'),
|
||||
('network', 'ssl-strict', 'false'),
|
||||
]
|
||||
for sect, opt, value in settings:
|
||||
self.set_setting(sect, opt, value)
|
||||
|
||||
def after_test(self, did_fail):
|
||||
"""Handle unexpected/skip logging and clean up after each test.
|
||||
|
||||
|
@ -239,6 +239,7 @@ class Process(QObject):
|
||||
raise ProcessExited()
|
||||
|
||||
if blocker.signal_triggered:
|
||||
self._after_start()
|
||||
return
|
||||
|
||||
raise WaitForTimeout("Timed out while waiting for process start.")
|
||||
@ -268,6 +269,10 @@ class Process(QObject):
|
||||
assert ok
|
||||
assert self.is_running()
|
||||
|
||||
def _after_start(self):
|
||||
"""Do things which should be done immediately after starting."""
|
||||
pass
|
||||
|
||||
def before_test(self):
|
||||
"""Restart process before a test if it exited before."""
|
||||
self._invalid = []
|
||||
|
Loading…
Reference in New Issue
Block a user