pytest

Run Python tests with fixtures, parametrization, and plugins.

3|1|Updated Dec 8, 2025
One-click install
npx skills add https://github.com/bobmatnyc/terminator --skill pytest-bobmatnyc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytest
Source: https://github.com/bobmatnyc/terminator/tree/main/.claude/skills/toolchains-python-testing-pytest
Command: npx skills add https://github.com/bobmatnyc/terminator --skill pytest-bobmatnyc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

pytest eliminates the manual, brittle testing process by providing a mature, feature-rich framework for Python tests, fixtures, and plugins.

Core Features & Use Cases

  • Fixture system for dependency injection and setup/teardown
  • Parametrization for data-driven tests
  • Broad plugin ecosystem (cov, asyncio, mock, django)
  • Use Case: write tests for FastAPI endpoints, Django models, or plain Python functions

Quick Start

Install pytest with pip, create test_*.py files, and run pytest to discover and execute tests.

Frequently Asked Questions about pytest

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Python tests for FastAPI or Django projects?

You can automate Python tests for FastAPI or Django by using a mature testing framework that handles test discovery, fixtures, and parametrization. It provides built-in support for running unit and integration tests across these web frameworks.

What is the best way to set up dependency injection and teardown in Python testing?

The best way to set up dependency injection and teardown in Python testing is by using a fixture system. Fixtures manage setup and teardown operations, providing a clean, extensible way to inject dependencies into your test functions.

Can I run data-driven tests and async tests in Python?

Yes, you can run data-driven and async tests in Python. The framework supports parametrization for data-driven test cases and offers broad plugin compatibility, including plugins specifically designed for asyncio testing.

Does this Python testing framework support mocking and code coverage?

Yes, this Python testing framework supports mocking and code coverage through its broad plugin ecosystem. Plugins for coverage and mocking integrate directly into the test runner to provide comprehensive test analysis.

How do I get started writing Python unit tests?

To start writing Python unit tests, install the framework with pip, create files prefixed with test_, and run the test command. The framework automatically discovers and executes the test functions in those files.