If you're writing Python tests, this is the framework you should be using. It handles everything from simple assertions to complex integration tests with fixtures for dependency injection, parametrization for data-driven testing, and plugins for coverage, async, and mocking. The fixture system is genuinely better than setup/teardown methods, and parametrize decorators let you run the same test with different inputs without copy-pasting code. Works seamlessly with FastAPI, Django, and Flask, supports async/await natively, and the assertion introspection means you just write assert statements instead of assertEqual noise. Industry standard for good reason.
- skills.sh installs
- 1.3K
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill pytest --agent claude-codeInstalls into .claude/skills of the current project.
Files
pytest - Professional Python Testing
Overview
pytest is the industry-standard Python testing framework, offering powerful features like fixtures, parametrization, markers, plugins, and seamless integration with FastAPI, Django, and Flask. It provides a simple, scalable approach to testing from unit tests to complex integration scenarios.
Key Features:
- Fixture system for dependency injection
- Parametrization for data-driven tests
- Rich assertion introspection (no need for
self.assertEqual) - Plugin ecosystem (pytest-cov, pytest-asyncio, pytest-mock, pytest-django)
- Async/await support
- Parallel test execution with pytest-xdist
- Test discovery and organization
- Detailed failure reporting
Installation:
# Basic pytest
pip install pytest
# With common plugins
pip install pytest pytest-cov pytest-asyncio pytest-mock
# For FastAPI testing
pip install pytest httpx pytest-asyncio
# For Django testing
pip install pytest pytest-django
# For async databases
pip install pytest-asyncio aiosqlite
Basic Testing Patterns
1. Simple Test Functions
# test_math.py
def add(a, b):
return a + b
Sponsors
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Categories
- Testing & QA, Python
More from bobmatnyc/claude-mpm-skills
All 158- Drizzle Migrations1.3K
- Tailwind Css1.2K
- Docker1.1K
- Trpc Type Safety1K
- Biome949
- Vitest942
- Daisyui915
- Zod899
- Sqlalchemy Orm873
- Github Actions771
- Nodejs Backend Typescript745
- Cypress664
- Session Compression664
- Opentelemetry647
- Hono Cloudflare639
- Wordpress Security Validation618
- Xlsx599
- Tanstack Query595
- Fastify582
- Api Design Patterns579
- Skill Creator569
- Git Workflow568
- Express Production519
- Golang Grpc518
