Add nicer support for coverage

Just to encourage people to use the coverage tool (and write tests).

Change-Id: Ie30f9143a91363461aaaee59e0f9521d264dcd3e
This commit is contained in:
Angus Salkeld
2013-12-09 17:25:00 +11:00
parent 5a04efd6df
commit 81369a75d6
3 changed files with 16 additions and 0 deletions

7
.coveragerc Normal file
View File

@@ -0,0 +1,7 @@
[run]
branch = True
source = solum
omit = solum/tests/*,solum/openstack/*
[report]
ignore-errors = True

1
.gitignore vendored
View File

@@ -27,6 +27,7 @@ pip-log.txt
.coverage
.testrepository
.tox
cover
nosetests.xml
# Translations

8
coverage.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/sh
args=
if [ -n "$@" ] ; then
args="-t $@"
fi
python setup.py testr --coverage --slowest "$args"
python -m coverage report --show-missing
echo "Coverage generated, see cover/index.html"