From bc0cd7eb9001b4265fc5bf3776998db3ccce6c17 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sat, 4 Mar 2017 22:38:18 -0800 Subject: [PATCH] coverage: Move coverage config to tools/coveragerc. --- tools/coveragerc | 11 +++++++++++ tools/test-backend | 4 +--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 tools/coveragerc diff --git a/tools/coveragerc b/tools/coveragerc new file mode 100644 index 0000000000..0b55410dff --- /dev/null +++ b/tools/coveragerc @@ -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/* diff --git a/tools/test-backend b/tools/test-backend index 736e6e63e1..1a2d2fca05 100755 --- a/tools/test-backend +++ b/tools/test-backend @@ -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