pytest-coverage

Run pytest tests with coverage analysis and generate annotated reports.

1|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/dhar174/langgraph_system_generator --skill pytest-coverage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytest-coverage
Source: https://github.com/dhar174/langgraph_system_generator/tree/main/.github/skills/pytest-coverage
Command: npx skills add https://github.com/dhar174/langgraph_system_generator --skill pytest-coverage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps ensure that your Python test suite covers all lines of your codebase, identifying and fixing areas with insufficient test coverage.

Core Features & Use Cases

  • Generate Coverage Reports: Creates detailed reports showing which lines of code are executed by tests.
  • Identify Missing Coverage: Highlights specific lines of code not covered by any tests.
  • Annotated Source Code: Provides line-by-line annotations to pinpoint uncovered lines.
  • Use Case: After writing new features and tests, use this Skill to verify that all new code is adequately tested, preventing regressions and ensuring code quality.

Quick Start

Run pytest with coverage enabled and generate an annotated report for the current module.

Frequently Asked Questions about pytest-coverage

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

FAQPage Schema
How do I check pytest code coverage for my Python modules?

To check pytest code coverage, execute pytest with coverage analysis enabled to generate detailed reports showing which lines of code are executed by tests and which are missing coverage.

What is an annotated coverage report in Python testing?

An annotated coverage report provides line-by-line source code annotations to pinpoint specific uncovered lines of Python code not hit by any tests, facilitating the process of increasing test coverage incrementally towards 100%.

Do I need coverage.py installed to run pytest and identify missing test coverage?

Yes, you need both pytest and coverage.py installed and configured in your environment to execute tests with coverage analysis and generate annotated reports identifying uncovered lines.

How do I get 100% code coverage for my Python codebase incrementally?

To get 100% code coverage incrementally, run pytest with coverage enabled to generate annotated source code reports, then write targeted tests for the specific highlighted lines that lack coverage.

Can I use this to verify new Python features are adequately tested?

Yes, after writing new features and tests, you can use this coverage analysis to verify that all new code is adequately tested, preventing regressions and ensuring overall code quality.