add coverage & makefile

This commit is contained in:
Fred 2015-12-28 10:05:16 +01:00
parent f71a9ef175
commit 8d7b7d31a1
5 changed files with 28 additions and 0 deletions

10
.coveragerc Normal file
View File

@ -0,0 +1,10 @@
# .coveragerc to control coverage.py
[run]
branch = True
omit = ../*migrations*
[report]
ignore_errors = True
[html]
directory = coverage_html_report

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ __pycache__
*.sqlite3
*.*~
migrations
.coverage

16
Makefile Normal file
View File

@ -0,0 +1,16 @@
# Makefile for gwift
#
# User-friendly check for coverage
ifeq ($(shell which coverage >/dev/null 2>&1; echo $$?), 1)
$(error The 'coverage' command was not found. Make sure you have coverage installed)
endif
.PHONY: help coverage
help:
@echo " coverage to run coverage check of the source files."
coverage:
coverage run --source='.' manage.py test; coverage report; coverage html;
@echo "Testing of coverage in the sources finished."

View File

@ -7,3 +7,4 @@ nose==1.3.7
pep8==1.5.7
Pillow==3.0.0
pyflakes==1.0.0
coverage