Pytest Coverage

🏢Official
by github · vlatest · Repository

This skill generates pytest coverage reports to assess code test execution and identify gaps for improved reliability.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add pytest-coverage npx -- -y @trustedskills/pytest-coverage
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "pytest-coverage": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/pytest-coverage"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

The pytest-coverage skill integrates with Python's pytest testing framework to measure code coverage during test execution. It provides detailed reports on which parts of the codebase are exercised by tests, helping developers identify untested areas and improve test quality.

When to use it

  • You want to ensure all critical sections of your Python code are tested after writing new features.
  • You're working on a project with multiple contributors and need consistent coverage metrics across different branches or pull requests.
  • Your team is following test-driven development (TDD) practices and needs real-time feedback on test completeness.

Key capabilities

  • Generates code coverage reports in various formats like HTML, XML, and JSON.
  • Integrates seamlessly with pytest for automated testing workflows.
  • Highlights lines of code that are not executed by tests, aiding in debugging and refactoring efforts.

Example prompts

  • "Run pytest with coverage analysis on the test suite."
  • "Generate an HTML coverage report after executing all unit tests."
  • "Show me which functions in utils.py are not covered by tests."

Tips & gotchas

  • Ensure that your project has pytest and coverage.py installed before using this skill.
  • Some code, like conditionals inside functions that aren't triggered during testing, may appear as uncovered even if logically correct. Always review coverage reports in context.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
github
Installs
4.0k

🏢 Official

Published by the company or team that built the technology.