diff --git a/.gitignore b/.gitignore index 1131674..500f282 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ /venv/ /src/ +/.coverage +/htmlcov/ *.pyc *.swp *.sqlite3 diff --git a/coverage.sh b/coverage.sh new file mode 100755 index 0000000..68a0c06 --- /dev/null +++ b/coverage.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +. venv/bin/activate + +which coverage >/dev/null 2>&1 +if [ "$?" -ne 0 ]; then + pip install coverage +fi + +coverage run --branch --source=accounts,ponyconf,proposals,conversations --omit=*/migrations/*,*/apps.py,ponyconf/wsgi.py manage.py test +coverage html +xdg-open htmlcov/index.html