python-testing

Automate Python testing workflows with pytest, TDD, fixtures, and coverage strategies.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/SeanChenR/ghibli --skill python-testing-seanchenr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-testing
Source: https://github.com/SeanChenR/ghibli/tree/main/.claude/skills/python-testing
Command: npx skills add https://github.com/SeanChenR/ghibli --skill python-testing-seanchenr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Python projects often struggle with establishing consistent, maintainable tests. This Skill provides structured guidance on pytest usage, TDD workflows, fixtures, parametrization, mocking, and achieving target coverage.

Core Features & Use Cases

  • Structured testing patterns: pytest-based test organization, fixture-driven test data, and parameterized scenarios.
  • TDD mindset: red-green-refactor approach aligned with Python code development.
  • Coverage & quality: strategies to reach 80%+ coverage and enforce critical-path testing across applications.

Quick Start

Write a simple failing test, implement the minimal functionality to pass, then refactor and expand tests to cover edge cases.

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 for parameterized test scenarios?

Structure pytest fixtures by defining reusable test data functions, then apply parameterization to run scenarios across multiple inputs. This approach isolates test data, reduces duplication, and ensures consistent test execution across diverse parameterized cases.

What is the red-green-refactor workflow in TDD for Python?

The red-green-refactor TDD workflow involves writing a failing test first, implementing minimal Python code to pass that test, then refactoring the logic. This ensures requirements validation and maintains code quality throughout development.

How can I use mocking in pytest to isolate external dependencies?

Use mocking in pytest to replace external dependencies with simulated objects during test execution. This isolates the specific module being tested, prevents network calls, and ensures consistent test results without relying on live services.

What's the best way to achieve 80% code coverage in Python applications?

Achieve 80% code coverage by configuring coverage reporting tools alongside pytest, identifying untested critical paths, and expanding parameterized tests to cover edge cases. This enforces quality assurance across Python applications.

Does test-driven development work well for existing Python project setup?

Test-driven development fits existing Python projects by applying pytest workflows to validate current functionality before refactoring. You can introduce fixtures and coverage strategies incrementally to establish consistent, maintainable tests.