From 8d38dfefd2e978b72f72b2266184322c7e777580 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Fri, 25 Apr 2014 10:23:31 -0700 Subject: [PATCH] Add support for measuring coverage Change-Id: I219e14658c025fa13f3e0f8ba9dc6945ce777120 --- .coveragerc | 9 +++++++++ test-requirements.txt | 1 + tox.ini | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..856af20 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,9 @@ +[run] +branch = True +omit = + .tox* + +[report] +exclude_lines = + pragma: no cover + raise NotImplementedError diff --git a/test-requirements.txt b/test-requirements.txt index e9ffd03..0753f26 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,4 @@ +coverage>=3.6 discover flake8 mock diff --git a/tox.ini b/tox.ini index bdba534..d9424b8 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,11 @@ install_command = pip install {opts} {packages} deps = -r{toxinidir}/test-requirements.txt commands = python -m discover +[testenv:cover] +commands = + coverage run -m discover + coverage report --show-missing + [tox:jenkins] downloadcache = ~/cache/pip