From 69bd587667c6d93d96fd8ee5ca92ec463b9fc779 Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Mon, 2 Jun 2014 18:29:27 -0700 Subject: [PATCH] Fix coverage report generation with tox Previously no coverage report was produced as the package name was confusing the coverage module. We were also using the wrong command. This also adds a coveragerc so that the results are sane. Change-Id: I204f52eeae71ac11274431f9cdf518d19e42f94b --- .coveragerc | 7 +++++++ tox.ini | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..d595acb --- /dev/null +++ b/.coveragerc @@ -0,0 +1,7 @@ +[run] +branch = True +source = os_collect_config +omit = os_collect_config/tests/*,os_collect_config/openstack/* + +[report] +ignore-errors = True diff --git a/tox.ini b/tox.ini index c629b73..fd1551d 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,7 @@ commands = flake8 [testenv:cover] setenv = VIRTUAL_ENV={envdir} commands = - python setup.py testr --coverage + python setup.py test --coverage --coverage-package-name=os_collect_config [testenv:venv] commands = {posargs}