Skip to content

Commit

Permalink
added section to development on coverage output from pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkern authored and petrelharp committed Oct 31, 2021
1 parent 4467f53 commit 470a8a5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,23 @@ before::

Finally, rename ``pre-commit.sample`` to simply ``pre-commit``

*************
Code Coverage
*************

As part of the continuous testing suite we have automated checking of how
well the test units cover the source code. As a result it's very helpful
to check locally how well your tests are covering your code by asking
`pytest` for coverage reports. This can be done with::

$ pytest --cov-report html --cov=stdpopsim tests/

this will output of directory of html files for you to browse test coverage
for every file in `stdpopsim` in a reasonably straightfoward graphical
way. You'll be looking for lines of code that are highlighted yellow or red
indicated that tests do not currently cover that bit of code.


*************
Documentation
*************
Expand Down

0 comments on commit 470a8a5

Please sign in to comment.