Commit cc379df8 authored by Luna's avatar Luna 😻

tests.conftest: add teardown to prevent overuse of resources

parent 169d22ad
Pipeline #52192749 passed with stage
in 9 minutes and 7 seconds
......@@ -45,7 +45,11 @@ def _test_app(unused_tcp_port, event_loop):
# make sure we're calling the before_serving hooks
event_loop.run_until_complete(main_app.startup())
return main_app
# https://docs.pytest.org/en/latest/fixture.html#fixture-finalization-executing-teardown-code
yield main_app
# properly teardown
event_loop.run_until_complete(main_app.shutdown())
@pytest.fixture(name='test_cli')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment