From c3b7251de413032f3fc90e1d241d1098e0d2c640 Mon Sep 17 00:00:00 2001 From: Ronald Bradford Date: Mon, 5 Oct 2015 12:54:07 -0400 Subject: [PATCH] Added code coverage section to tox Defined cover in tox.ini and added .coveragerc configuration consistent with other projects http://lists.openstack.org/pipermail/openstack-dev/2015-October/076193.html Change-Id: I426f1081425ca9f8ea4297c665632954cc74bb8d --- .coveragerc | 8 ++++++++ .gitignore | 1 + tox.ini | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..bbbf748 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[run] +branch = True +source = automaton +omit = automaton/tests/* + +[report] +ignore_errors = True +precision = 2 diff --git a/.gitignore b/.gitignore index a9a998b..f678959 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ htmlcov/ .testrepository/ .tox/ .coverage +cover .cache nosetests.xml coverage.xml diff --git a/tox.ini b/tox.ini index 373b2e8..17323b6 100644 --- a/tox.ini +++ b/tox.ini @@ -34,3 +34,6 @@ commands = {posargs} [flake8] show-source = True exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build + +[testenv:cover] +commands = python setup.py test --coverage --testr-args="{posargs}"