This skill equips Claude with comprehensive guidelines and implementation patterns for writing high-quality Python tests across popular frameworks. It enforces a functional pytest-first approach, moving away from legacy class-based unittest styles in favor of reusable fixtures, httpx for async API testing, and factory_boy for test data management. Whether building FastAPI endpoints, Django models, or Flask services, this skill ensures consistent directory structures, naming conventions, and robust mocking strategies, making it indispensable for maintaining clean and testable Python codebases.
主要功能
01Implements modular fixture patterns using centralized conftest.py files
02Provides async testing patterns for FastAPI using httpx and ASGITransport
03Enforces modern pytest standards over legacy unittest classes
04Streamlines Django testing with pytest-django and automatic DB transaction management
05Guidance on utilizing AsyncMock and MagicMock for effective dependency isolation
060 GitHub stars