Add code coverage to unit testing

This commit is contained in:
Trever Fischer
2012-06-09 22:24:18 -04:00
parent c4793874bf
commit 9845aca676
3 changed files with 8 additions and 1 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@ local_settings.py
*.pyc
*.swp
virtualenv
.coverage

View File

@@ -6,3 +6,4 @@ django-mptt==0.5.2
django_messages==0.4.4
south==0.7.3
django-piston==0.2.2
coverage

View File

@@ -4,4 +4,9 @@ if [ ! -f virtualenv/bin/activate ];then
fi
source virtualenv/bin/activate
pip install -r pip-requirements
exec ./manage.py test $@
coverage run ./manage.py test $@
ret=$?
if [ $ret -eq 0 ];then
coverage report -m --include=\*
fi
exit $ret