tdd-pytest

Automate pytest test-driven development with Red-Green-Refactor and coverage reporting.

4|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/89jobrien/steve --skill tdd-pytest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-pytest
Source: https://github.com/89jobrien/steve/tree/main/steve/skills/tdd-pytest
Command: npx skills add https://github.com/89jobrien/steve --skill tdd-pytest

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Python/pytest TDD specialist for test-driven development workflows, auditing test quality, running tests with coverage, and generating test reports.

Core Features & Use Cases

  • TDD workflow guidance (Red-Green-Refactor)
  • Test organization and fixtures guidance
  • Pytest configuration and coverage setup
  • Framework-appropriate testing patterns

Quick Start

Initialize your pytest configuration and run tests with uv and pyproject.toml.

Frequently Asked Questions about tdd-pytest

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

FAQPage Schema
How do I set up test-driven development with pytest in Python?

Test-driven development with pytest starts by writing failing tests first, then implementing code to pass them using the Red-Green-Refactor cycle. Configure pytest in pyproject.toml, organize tests with fixtures and parametrization, then run tests with coverage reporting to validate your implementation.

Can I run pytest with coverage reporting and generate a test report?

Yes, pytest with coverage generates detailed reports of code paths tested. This Skill automates running tests with coverage, producing TESTING_REPORT.local.md to document test results and coverage metrics configured in pyproject.toml.

What's the best way to organize pytest fixtures and test patterns?

Organize pytest fixtures by scope and reusability, apply parametrization for multiple test cases, and follow framework-appropriate patterns for async and exception testing. This Skill provides templates and examples for structuring tests that follow pytest best practices.

How do I audit existing pytest files for test quality?

Auditing pytest files involves reviewing test organization, fixture usage, coverage gaps, and adherence to TDD principles. This Skill analyzes existing pytest configurations and test structure to identify quality issues and suggest improvements aligned with Red-Green-Refactor workflows.

Do I need uv and pyproject.toml to run pytest tests?

While pytest runs independently, using uv with pyproject.toml simplifies dependency management and test execution. This Skill configures both to streamline running pytest commands and managing test coverage as part of a unified Python project setup.

Why should I write tests before code in Python projects?

Test-driven development ensures code meets requirements from the start, improves design clarity, and catches bugs early. The Red-Green-Refactor cycle—writing failing tests, implementing code, then refactoring—produces more maintainable and reliable Python applications.