
Pytest Coverage
The pytest-coverage skill runs pytest with coverage analysis to identify untested code lines and helps developers achieve 100% test coverage. It generates annotated source files marking uncovered lines with exclamation marks, allowing developers to systematically write tests for missing coverage. This skill is for Python developers who want to ensure their test suites comprehensively cover all code paths.
- skills.sh installs
- 13K
- GitHub stars
- 41K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add github/awesome-copilot --skill pytest-coverage --agent claude-codeInstalls into .claude/skills of the current project.
Files
The goal is for the tests to cover all lines of code.
Generate a coverage report with:
pytest --cov --cov-report=annotate:cov_annotate
If you are checking for coverage of a specific module, you can specify it like this:
pytest --cov=your_module_name --cov-report=annotate:cov_annotate
You can also specify specific tests to run, for example:
pytest tests/test_your_module.py --cov=your_module_name --cov-report=annotate:cov_annotate
Open the cov_annotate directory to view the annotated source code. There will be one file per source file. If a file has 100% source coverage, it means all lines are covered by tests, so you do not need to open the file.
For each file that has less than 100% test coverage, find the matching file in cov_annotate and review the file.
If a line starts with a ! (exclamation mark), it means that the line is not covered by tests. Add tests to cover the missing lines.
Keep running the tests and improving coverage until all lines are covered.
Sponsors
Details
- Repository
- github.com/github/awesome-copilot
- Categories
- Testing & QA, Git & Pull Requests, AI & Agent Building, Python
More from github/awesome-copilot
All 318- Penpot Uiux Design12.9K
- Memory Merger12.9K
- Postgresql Code Review12.8K
- Create Implementation Plan12.6K
- Webapp Testing12.5K
- Architecture Blueprint Generator12.3K
- Typescript Mcp Server Generator12.1K
- Java Junit11.8K
- Dotnet Design Pattern Review11.7K
- Dotnet Upgrade11.7K
- Apple Appstore Reviewer11.5K
- Review And Refactor11.1K
- Update Implementation Plan11.1K
- Make Repo Contribution11.1K
- Csharp Async11.1K
- Editorconfig11K
- Create Github Action Workflow Specification10.8K
- Java Docs10.8K
- Python Mcp Server Generator10.5K
- Csharp Xunit10.4K
- Ai Prompt Engineering Safety Review10.4K
- Agentic Eval10.3K
- Create Architectural Decision Record10.3K
- Breakdown Feature Prd10.1K