From a57262ec5e9255bd245d69c1176945e77832ac8e Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 12 Apr 2020 15:46:37 +0100 Subject: [PATCH] Run Django tests with coverage --- dev-requirements.txt | 1 + scripts/test.sh | 2 ++ setup.cfg | 3 +++ 3 files changed, 6 insertions(+) diff --git a/dev-requirements.txt b/dev-requirements.txt index 9fb9c78..889ae33 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -9,3 +9,4 @@ flake8-builtins==1.5.2 flake8-comprehensions==3.2.2 flake8-mutable==1.2.0 flake8-tuple==0.4.1 +coverage==5.0.4 diff --git a/scripts/test.sh b/scripts/test.sh index 2810d47..9331707 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -4,6 +4,8 @@ set -e export PATH=env/bin:${PATH} +coverage run manage.py test $@ + echo "> Running formatter..." black website/ --check diff --git a/setup.cfg b/setup.cfg index e9892c6..2f86b76 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,3 +14,6 @@ force_grid_wrap=0 use_parentheses=True line_length=88 not_skip=__init__.py + +[coverage:run] +source = "website"