test: ensure the context cleanup is executed (#3040)
See https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/contextmanager-generator-missing-cleanup.html
This commit is contained in:
parent
d99d6e1a68
commit
6958070eec
|
@ -119,9 +119,10 @@ def run_liq_server(
|
||||||
if process.poll() is not None:
|
if process.poll() is not None:
|
||||||
pytest.fail(process.stdout.read())
|
pytest.fail(process.stdout.read())
|
||||||
|
|
||||||
yield manager
|
try:
|
||||||
|
yield manager
|
||||||
process.terminate()
|
finally:
|
||||||
|
process.terminate()
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(
|
@pytest.fixture(
|
||||||
|
|
Loading…
Reference in New Issue