python-testing

Automate Python testing with pytest, TDD, fixtures, parametrization, mocks, and coverage.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/adomot/claude-settings --skill python-testing-adomot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-testing
Source: https://github.com/adomot/claude-settings/tree/main/skills/aegis/python-testing
Command: npx skills add https://github.com/adomot/claude-settings --skill python-testing-adomot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill provides a structured approach to Python testing, combining pytest, TDD, fixtures, mocks, and coverage practices to help teams write reliable tests and improve code quality.

Core Features & Use Cases

  • TDD workflow: practice red-green-refactor cycles to drive design and quality.
  • Test scaffolding: templates for fixtures, parametrized tests, and mock usage to accelerate test writing.
  • Coverage and reliability: guidance to achieve high test coverage and maintainable test suites across Python projects.
  • Use Case: a backend service with multiple modules can adopt these patterns to ensure regression safety during refactoring.

Quick Start

Begin by writing a failing test for a new feature, then implement just enough code to pass, and refactor when green.

Frequently Asked Questions about python-testing

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

FAQPage Schema
How do I structure pytest fixtures and parametrized tests for a Python project?

You structure pytest fixtures and parametrized tests by using test scaffolding templates to accelerate test writing, manage setup logic, and execute multiple test scenarios efficiently across Python projects.

What is the TDD workflow for building Python features?

The TDD workflow for Python features involves practicing red-green-refactor cycles to drive design and quality, where you begin by writing a failing test, implement just enough code to pass, and refactor when green.

How do I use mocks in pytest to isolate asynchronous tests?

You use mocks in pytest by applying established mocking patterns to isolate components, supporting the reliable execution of asynchronous tests across typical software projects.

How do I enforce coverage targets and maintainable test suites in Python?

You enforce coverage targets in Python by documenting clear coverage goals and utilizing pytest-based tooling guidance to achieve high test coverage and maintainable test suites during module refactoring.

Does this Python testing approach work for backend services with multiple modules?

Yes, this Python testing approach works for backend services with multiple modules by adopting pytest, TDD, fixtures, and mock patterns to ensure regression safety during refactoring.