
pytest-coverage
Run pytest with coverage reporting to identify and eliminate untested code lines
by githubFree
Description
pytest-coverage is an agent skill from the github/awesome-copilot collection that runs pytest with coverage reporting, to find the lines of code that no test reaches and then to write the tests that close the gap. It generates an annotated report with pytest's coverage tool, writing one annotated source file per module into a cov_annotate folder, where lines that are not covered carry an exclamation mark marker. A file with full coverage needs no review. The skill can check a specific module with a coverage option that names it, and it can run only a chosen test file, which keeps the feedback loop short while a module is being tested. The target it works toward is complete coverage of the lines, and it reviews each file that falls short by reading its annotated version and writing tests for the missing paths. It is useful for Python teams who want to see which parts of their code are untested and need an orderly way to add tests. Coverage shows that a line ran, not that it behaves correctly, so the tests should assert the right results and not only exercise the code, and a target of 100 percent should not be pursued at the expense of tests that check real behavior. The skill is installed with the skills CLI from the github/awesome-copilot repository. Its skills.sh page showed about 12.8K installs and passing results from three security audits at the time of the scan.…
Highlights
- pytest coverage with annotated source files
- Uncovered lines marked in cov_annotate
- Module-specific coverage checks
- Targeted test runs for a single test file
- Installs with the skills CLI
Ratings & Reviews
No ratings yet
Be the first to rate pytest-coverage.
People also visit
pytest-coverage FAQ
What does the report show?
One annotated source file per module in cov_annotate, with uncovered lines marked by an exclamation mark.
Does coverage prove correctness?
No. It shows a line ran, not that it behaves correctly, so the tests should assert the right results.
Can I check a single module?
Yes. Name the module with the coverage option, and run a single test file if you want.
How do I install it?
Run npx skills add https://github.com/github/awesome-copilot --skill pytest-coverage.
What security audits does it have?
skills.sh lists three audits: Gen Agent Trust Hub Pass, Socket Pass and Snyk Pass.
What are the best pytest-coverage alternatives?
Popular alternatives to pytest-coverage include python-testing-patterns, temporal-python-testing and python-pro. See all pytest-coverage alternatives


