From a7a0219b77fe636b9def0a37e0c40fe35332e514 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Mon, 17 Nov 2014 16:29:26 -0600 Subject: [PATCH] Add coverage-package-name to tox.ini for coverage Recent pbrs support a coverage-package-name argument which allows you to explicitly specify the package name to test coverage of. By default it takes the project name (python-openstacksdk) and splits the "python-" prefix off, leaving it to check coverage of the nonexistent "openstacksdk" package. After this, "tox -e cover html" works and drops the results in a cover/ folder under root. Change-Id: I55e3fb274158aa37938329f2153c5c9597e64915 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 3b621c29..deb7aeb1 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ commands = flake8 commands = {posargs} [testenv:cover] -commands = python setup.py testr --coverage --testr-args='{posargs}' +commands = python setup.py testr --coverage --coverage-package-name=openstack --testr-args='{posargs}' [testenv:docs] commands = python setup.py build_sphinx