Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Pytest code coverage examples

This repository demonstrates various ways of collecting code coverage using pytest with pytest-cov (which leverages coverage.py) against the local in-src package and also against installed versions of the package. We look at two common project layouts: the first, the basic_layout where the package resides at the root of the project directory, and the src_layout where the package resides in a src subdirectory of the project directory.

After getting your environment set up, head over to the example

This repository serves as an accompaniment to my blog post on collecting code coverage in python

Environment set up

To test these examples you'll need python 3.6+ and you'll want to set up a virtualenv:

$ python -m venv .venv
$ pip install -r requirements.txt

About

Examples of how to collect coverage in `pytest` using `pytest-cov`.

Resources

Releases

No releases published

Packages

No packages published

Languages