Pytest

A shop ledger page, 1899. Every line adds up.
Testing Async FastAPI With SQLAlchemy and pytest
Set up pytest-asyncio, dependency overrides and per-test transaction rollback so async FastAPI and SQLAlchemy tests stay isolated and avoid event loop errors.
4 min read