From 1cdc24107a8e628026edcfaae5b091079694ce89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Bouttier?= Date: Tue, 5 Jul 2016 23:25:20 +0200 Subject: [PATCH] coverage script --- .gitignore | 2 ++ coverage.sh | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100755 coverage.sh 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