mirror of
https://github.com/evroon/bracket.git
synced 2026-01-02 11:09:40 -05:00
Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version. - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](pytest-dev/pytest-asyncio@v0.21.2...v0.25.3)
20 lines
517 B
Python
20 lines
517 B
Python
# pylint: disable=redefined-outer-name
|
|
from collections.abc import AsyncIterator
|
|
|
|
import pytest_asyncio
|
|
|
|
from tests.integration_tests.api.shared import UvicornTestServer
|
|
|
|
|
|
@pytest_asyncio.fixture(loop_scope="session", scope="module", autouse=True)
|
|
async def startup_and_shutdown_uvicorn_server() -> AsyncIterator[None]:
|
|
"""
|
|
Start server as test fixture and tear down after test
|
|
"""
|
|
server = UvicornTestServer()
|
|
try:
|
|
await server.up()
|
|
yield
|
|
finally:
|
|
await server.down()
|