diff --git a/README.md b/README.md index 389c52e..78e439f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Example for [FastAPI](https://fastapi.tiangolo.com/) integration with [SQLAlchem Beside of using latest and greatest version of [SQLAlchemy](https://www.sqlalchemy.org/) with it robustness, powerfulness and speed of [asyncpg](https://github.com/MagicStack/asyncpg) there is [FastAPI](https://fastapi.tiangolo.com/) (modern, fast (high-performance), -web framework for building APIs with Python 3.9+ based on standard Python type hints.) already reviewed +web framework for building APIs with Python 3.10+ based on standard Python type hints.) already reviewed on [thoughtworks](https://www.thoughtworks.com/radar/languages-and-frameworks?blipid=202104087). diff --git a/tests/api/test_stuff.py b/tests/api/test_stuff.py index aa039e5..3b99fa3 100644 --- a/tests/api/test_stuff.py +++ b/tests/api/test_stuff.py @@ -4,8 +4,7 @@ import pytest from fastapi import status from httpx import AsyncClient -# decorate all tests with @pytest.mark.asyncio -pytestmark = pytest.mark.asyncio +pytestmark = pytest.mark.anyio @pytest.mark.parametrize( diff --git a/tests/conftest.py b/tests/conftest.py index 4fcf732..a844f3a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,6 +10,16 @@ from the_app.database import get_db from the_app.main import app from the_app.models.base import Base + +@pytest.fixture( + params=[ + pytest.param(("asyncio", {"use_uvloop": True}), id="asyncio+uvloop"), + ] +) +def anyio_backend(request): + return request.param + + global_settings = config.get_settings() url = global_settings.asyncpg_test_url engine = create_async_engine(url, poolclass=NullPool, future=True)