Added automatic pytest coverage annotated HTML report

* added automatic coverage branch warnings and ignorable statements
This commit is contained in:
Rob McMullen 2017-05-07 09:18:37 -07:00
parent 5c26b02c7e
commit 5fcb646131
2 changed files with 22 additions and 0 deletions

20
test/.coveragerc Normal file
View File

@ -0,0 +1,20 @@
[run]
branch = True
[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain about missing debug-only code:
def __repr__
if self\.debug
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

2
test/pytest.ini Normal file
View File

@ -0,0 +1,2 @@
[pytest]
addopts = --cov=atrcopy --cov-report html --cov-report term