pytest

Installation
SKILL.md

When to use this skill

Use this skill whenever the user wants to:

  • Write and run Python unit tests with pytest
  • Use fixtures for test setup, teardown, and dependency injection
  • Parametrize tests to run with multiple input sets
  • Mock dependencies with pytest-mock or unittest.mock
  • Configure pytest via pytest.ini, pyproject.toml, or conftest.py
  • Generate coverage reports with pytest-cov
  • Run tests in parallel with pytest-xdist

How to use this skill

Workflow

  1. Write test functions with test_ prefix or Test class
  2. Use fixtures in conftest.py for shared setup and dependency injection
  3. Run tests with pytest CLI, applying markers and filters as needed
  4. Analyze results with coverage and reporting plugins
Related skills

More from partme-ai/full-stack-skills

Installs
23
GitHub Stars
379
First Seen
Jan 29, 2026