Add code coverage to unit testing
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@ local_settings.py
|
||||
*.pyc
|
||||
*.swp
|
||||
virtualenv
|
||||
.coverage
|
||||
|
@@ -6,3 +6,4 @@ django-mptt==0.5.2
|
||||
django_messages==0.4.4
|
||||
south==0.7.3
|
||||
django-piston==0.2.2
|
||||
coverage
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user