Pytest Patterns

Python backend testing patterns with pytest for FastAPI applications. Use when writing Python tests: unit tests for services and repositories, integration tests for API endpoints with httpx.AsyncClient, fixture creation, factory setup with factory_boy, async testing with pytest-asyncio, mocking strategies, and parametrized tests. Covers test organization (tests/unit, tests/integration), conftest hierarchy, and coverage requirements. Does NOT cover frontend tests (use react-testing-patterns) or E2E browser tests (use e2e-testing).

hieutrtr f8867c9 7 files · 53.0 KB Updated

File contents

hieutrtr/ai1-skills/tree/main/skills/pytest-patterns commit f8867c9ab3

Frequently asked questions

npx skillmds@latest add hieutrtr/pytest-patterns