Python testing framework with fixtures, parametrization, markers, and FastAPI, Django, and Flask integration.

skills.sh installs
1.3K
GitHub stars
80
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers unit and integration testing: assertions, fixtures with scopes, parametrized data-driven tests, and async test support
  • Includes plugin guidance for pytest-cov, pytest-asyncio, pytest-mock, pytest-django, and pytest-xdist parallel runs
  • Provides built-in markers such as skip, skipif, and xfail for conditional and expected-failure tests
  • Designed for Python projects following TDD workflows that test APIs, databases, and mocked dependencies

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill pytest -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Categories
Testing & QA, Python

More from bobmatnyc/claude-mpm-skills

All 154

Similar to Pytest

More Testing & QA