Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 26 lines (20 sloc) 601 Bytes
#!/bin/bash
# clean up previous results:
rm -rf htmlcov
mkdir htmlcov
rm .coverage
# I do not want coverage data for my South migrations:
PARMS=--omit='*migrations*'
# run the tests and collect coverage, only for our applications
coverage run --omit=.venv/* manage.py test --settings=associados.settings_test
# generate plaintext and HTML report
echo "----------------------------"
echo "Coverage results:"
coverage report $PARMS
coverage html $PARMS
echo "HTML report generated in htmlcov/index.html"
# optionally display an HTML report
if [ "$1" == "-f" ]
then
firefox htmlcov/index.html
fi