coverage: Move coverage config to tools/coveragerc.

This commit is contained in:
Tim Abbott 2017-03-04 22:38:18 -08:00
parent 63664264b8
commit bc0cd7eb90
2 changed files with 12 additions and 3 deletions

11
tools/coveragerc Normal file
View File

@ -0,0 +1,11 @@
[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Re-enable the standard coverage pragma
pragma: no cover
[run]
omit =
*/zulip-venv-cache/*
*/migrations/*
*/management/commands/*

View File

@ -230,9 +230,7 @@ if __name__ == "__main__":
if options.coverage:
import coverage
cov = coverage.Coverage(omit=["*/zulip-venv-cache/*",
"*/migrations/*",
"*/management/commands/*"])
cov = coverage.Coverage(config_file="tools/coveragerc")
cov.start()
if options.profile:
import cProfile