Skip to content

Instantly share code, notes, and snippets.

@marcelobbfonseca
Created April 1, 2019 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelobbfonseca/466245effb8fc568e03b34913c26d43e to your computer and use it in GitHub Desktop.
Save marcelobbfonseca/466245effb8fc568e03b34913c26d43e to your computer and use it in GitHub Desktop.
configuration file example for coverage.py. A python code coverage library https://coverage.readthedocs.io/en/v4.5.x/ for more info
# .coveragerc to control coverage.py
[run]
branch = True
omit =
my_env/*
*/migrations/*
*/__init__.py
[report]
omit =
my_env/*
*/migrations/*
*/__init__.py
# 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__.:
ignore_errors = True
[html]
directory = coverage_html_report
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment