Skip to content

Commit

Permalink
Add support for "who tests what" in coverage reports (pypa#626)
Browse files Browse the repository at this point in the history
* Record "who tests what" via dynamic contexts

https://coverage.readthedocs.io/en/latest/contexts.html#dynamic-contexts

* Use pytest-cov for more detail
  • Loading branch information
bhrutledge authored May 17, 2020
1 parent 895ac8a commit f7e3d85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ omit =
# and exists only to provide setuptools and python -m a place to point
# at.
*/twine/__main__.py

[html]
show_contexts = True
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ envlist = lint,types,py{36,37,38},docs

[testenv]
deps =
coverage
pretend
pytest
pytest-cov
jaraco.envs
portend
pytest-services
munch
commands =
coverage run --source twine -m pytest {posargs:tests}
coverage report -m
coverage html
pytest --cov=twine --cov-context=test \
--cov-report term-missing --cov-report html \
{posargs:tests}

[testenv:docs]
deps =
Expand Down

0 comments on commit f7e3d85

Please sign in to comment.