• Stars
    star
    2,791
  • Rank 15,620 (Top 0.4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The code coverage tool for Python

Coverage.py

Code coverage measurement for Python.

Stand with Ukraine


 PyPI status License Python versions supported
 Test suite status Quality check status Documentation Coverage reports
 Tidelift Sponsor me on GitHub GitHub stars coveragepy on Mastodon nedbat on Mastodon

Coverage.py measures code coverage, typically during test execution. It uses the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed.

Coverage.py runs on these versions of Python:

  • Python 3.8 through 3.12, and 3.13.0a6 and up.
  • PyPy3 versions 3.8 through 3.10.

Documentation is on Read the Docs. Code repository and issue tracker are on GitHub.

New in 7.x: initial function/class reporting; experimental support for sys.monitoring; dropped support for Python 3.7; added Coverage.collect() context manager; improved data combining; [run] exclude_also setting; report --format=; type annotations.

New in 6.x: dropped support for Python 2.7, 3.5, and 3.6; write data on SIGTERM; added support for 3.10 match/case statements.

For Enterprise

Tidelift Available as part of the Tidelift Subscription. Coverage and thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use. If you want the flexibility of open source and the confidence of commercial-grade software, this is for you. Learn more.

Getting Started

Looking to run coverage on your test suite? See the Quick Start section of the docs.

Change history

The complete history of changes is on the change history page.

Code of Conduct

Everyone participating in the coverage.py project is expected to treat other people with respect and to follow the guidelines articulated in the Python Community Code of Conduct.

Contributing

Found a bug? Want to help improve the code or documentation? See the Contributing section of the docs.

Security

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

License

Licensed under the Apache 2.0 License. For details, see NOTICE.txt.

More Repositories

1

byterun

A Python implementation of a Python bytecode runner
Python
1,267
star
2

watchgha

Live display of current GitHub action runs
Python
326
star
3

cog

Small bits of Python computation for static files
Python
318
star
4

scriv

Changelog management tool
Python
241
star
5

django_coverage_plugin

A plugin for coverage.py to measure Django template execution
Python
193
star
6

dinghy

A GitHub activity digest tool
Python
181
star
7

pkgsample

A simple example of how to structure a Python project
Python
82
star
8

truchet

Playing with Truchet tiles
Jupyter Notebook
47
star
9

gefilte

Gefilte Fish GMail filter creator
Python
41
star
10

pydoctor

A diagnostic program to show the Python environment
Python
27
star
11

dot

Personal dotfiles
Shell
25
star
12

pytest-gallery

A sampler of tests showing different ways to construct tests for pytest
Python
24
star
13

aptus

Mandelbrot fractal viewer
Python
20
star
14

pylintdb

Put pylint violations into sqlite
Python
19
star
15

cupid

Python
19
star
16

choosy

A Python teaching tool
Python
19
star
17

zellij

A toy for making geometric art, inspired by Islamic Zellij.
Python
18
star
18

flourish

Harmonograph toy
Python
13
star
19

gpxmapper

Python
12
star
20

adventofcode2017

Python
10
star
21

adventofcode2018

Python
9
star
22

unittest-mixins

Helpful unittest mixin classes
Python
9
star
23

adventofcode2019

Python
8
star
24

adventofcode2020

Python
8
star
25

unipain

PyCon presentation: Pragmatic Unicode, or, How Do I Stop the Pain?
HTML
8
star
26

odds

Odds & Ends
Python
8
star
27

iter

PyCon presentation about iteration
HTML
7
star
28

nedbatcom

nedbatchelder.com
HTML
7
star
29

song-basket

Simple Spotify app to collect songs into a basket playlist.
Python
6
star
30

pyhurry

Python
6
star
31

adventofcode2021

Python
6
star
32

nedbat

nedbat's profile
Shell
5
star
33

adventofcode2015

Python
5
star
34

adventofcode2022

adventofcode 2022
Python
5
star
35

adventofcode2016

Python
5
star
36

coverage_pytest_plugin

Python
5
star
37

adventures_prz

A presentation
JavaScript
4
star
38

coverage-reports

HTML
4
star
39

injectx

Python
4
star
40

test0

PyCon presentation: Getting Started Testing
HTML
4
star
41

pgeom

Jupyter Notebook
4
star
42

toomuchregex

A lightning talk
JavaScript
4
star
43

native-matrix

4
star
44

templite

Python
4
star
45

typing_app

JavaScript
4
star
46

blowyournose

Python
3
star
47

stilted

Python
3
star
48

bigo

HTML
3
star
49

version_dummy

Absolute minimal versioned Python package.
Shell
3
star
50

jreport

Utility for making console reports from JSON APIs
Python
3
star
51

hello-github-actions

3
star
52

commitstats

Jupyter Notebook
3
star
53

natsworld

Python
3
star
54

point_match

A presentation.
HTML
3
star
55

blogtools

Python
3
star
56

explainer

3
star
57

tabtest

Python
3
star
58

branch-tests

2
star
59

toxghabug

2
star
60

xunit_tools

Janky tools for doing things with xunit.xml files
Python
2
star
61

sarai

HTML
2
star
62

madlib

Python
2
star
63

blank_prz

A blank presentation, using my own crappy toolchain
JavaScript
2
star
64

django_issue_25793

Demo for https://code.djangoproject.com/ticket/25793
Python
2
star
65

prznames

HTML
2
star
66

dinghy_sample

An example of publishing Dinghy digests
HTML
2
star
67

wikicrawl

Python
2
star
68

cyclorama

Python
1
star
69

adventofcode2023

Python
1
star
70

nedbat_dinghy

HTML
1
star
71

hackathon-edx-exams-copy

Python
1
star