DiscoverTest & Code225: pytest-cov : The pytest plugin for measuring coverage
225: pytest-cov : The pytest plugin for measuring coverage

225: pytest-cov : The pytest plugin for measuring coverage

Update: 2025-01-23
Share

Description

pytest-cov is a pytest plugin that helps produce coverage reports using Coverage.py.

In this episode, we'll discuss:

  • what Coverage.py is
  • why you should measure code coverage on both your source and test code
  • what pytest-cov is
  • extra features pytest-cov gives you over and above coverage.py
  • and generally why using both is awesome

Links:

Errata:

  • I mentioned that Coverage has the ability to show context (which line is covered by which test) for the past year or so.
    • However, that feature was released in Oct 2018. coverage 5.0 alpha 
    • That's over 6 years. Oops. Sorry Ned.




Comments 
loading
00:00
00:00
x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

225: pytest-cov : The pytest plugin for measuring coverage

225: pytest-cov : The pytest plugin for measuring coverage

Brian Okken