pytest
Fast, scalable Python testing with fixtures, parametrization, and framework integration.
- Fixture system provides dependency injection and setup/teardown with function, class, module, and session scopes
- Parametrization enables data-driven tests; markers organize tests by category (unit, integration, slow, custom)
- Built-in support for FastAPI, Django, and Flask with async/await testing via pytest-asyncio
- Rich assertion introspection, mocking via pytest-mock, coverage reporting, and parallel execution with pytest-xdist
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
More from bobmatnyc/claude-mpm-skills
drizzle-orm
Type-safe SQL ORM for TypeScript with zero runtime overhead
4.2Kplaywright-e2e-testing
Playwright modern end-to-end testing framework with cross-browser automation, auto-wait, and built-in test runner
2.7Kpydantic
Python data validation using type hints and runtime type checking with Pydantic v2's Rust-powered core for high-performance validation in FastAPI, Django, and configuration management.
2.2Ktailwind-css
Tailwind CSS utility-first framework for rapid UI development with responsive design and dark mode
1.2Ktrpc-type-safety
tRPC end-to-end type-safe APIs for TypeScript with React Query integration and full-stack type safety
1.1Ksqlalchemy-orm
SQLAlchemy Python SQL toolkit and ORM with powerful query builder, relationship mapping, and database migrations via Alembic
871