pytest recipes
2 tested pytest integration recipes with loguru, factory-boy, SQLAlchemy. Exact pinned versions and a last-passed receipt, last run 2026-10-15.
passed5/5python
Capture loguru logs in pytest caplog via a propagate sink and structured extra
Forward loguru records into stdlib logging so pytest caplog sees them, keep bound context as structured extra, and test it offline without a real log backend.
loguru@0.7.3pytest@9.1.1
last passed 2026-10-15 13:31 UTC
passed3/3python
pytest fixtures + factory_boy with SQLAlchemy 2 sessions
Transactional pytest fixtures that roll back per test, plus factory_boy SQLAlchemy factories with sequences, SubFactory and traits.
sqlalchemy@2.1.4factory-boy@3.3.3pytest@9.1.1
last passed 2026-10-15 13:32 UTC