Стандарты pytest для Python-проектов

★ 7.5 · general

pytest-patterns is a Claude Code skill that establishes pytest best practices for writing comprehensive test suites in Python projects. It defines a three-tier folder structure (unit/integration/e2e), shared fixture setup via conftest.py using SQLAlchemy AsyncSession, asyncpg, and httpx AsyncClient, plus mocking patterns for external services with unittest.mock. The skill covers parametrize usage for boundary conditions, CLI commands with coverage flags (--cov, --cov-report), and enforces rules such as mandatory rollback after every data-creating fixture, isolation of all external APIs (email, Stripe, S3), and a coverage target of 80 %+ for services. It is aimed at teams building and testing async FastAPI applications with real database layers.