diff options
author | Aymeric Augustin | 2013-11-01 21:57:12 +0100 |
---|---|---|
committer | Aymeric Augustin | 2013-11-01 21:57:12 +0100 |
commit | 1c2bb37e06e97f9a1577f624e4bce4afa56bfcce (patch) | |
tree | 8dec46df5606a1c8b1ed3175176d495f20276c68 | |
parent | 96f1cb4b0d4b10903502e917ddaa460bc05f5ca3 (diff) | |
download | django-debug-toolbar-1c2bb37e06e97f9a1577f624e4bce4afa56bfcce.tar.bz2 |
Add command to measure test coverage.
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | Makefile | 14 | ||||
-rw-r--r-- | docs/contributing.rst | 4 | ||||
-rw-r--r-- | requirements_dev.txt | 1 |
4 files changed, 22 insertions, 5 deletions
@@ -1,9 +1,11 @@ *.pyc *.DS_Store *~ +build +.coverage +dist django_debug_toolbar.egg-info docs/_build example/db.sqlite3 -/dist -/build -/.tox +htmlcov +.tox @@ -1,16 +1,26 @@ # Make file to compress and join all JS files all: compress_js compress_css + + .PHONY: flake8 example test compress_js compress_css translatable_strings update_translations flake8: flake8 debug_toolbar example tests example: - PYTHONPATH=. django-admin.py runserver --settings=example.settings + DJANGO_SETTINGS_MODULE=example.settings PYTHONPATH=. \ + django-admin.py runserver test: - PYTHONPATH=. django-admin.py test --settings=tests.settings tests + DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=. \ + django-admin.py test tests + +coverage: + coverage erase + DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=. \ + coverage run --branch --source=debug_toolbar `which django-admin.py` test tests + coverage html compress_js: yuicompressor debug_toolbar/static/debug_toolbar/js/jquery.js > debug_toolbar/static/debug_toolbar/js/toolbar.min.js diff --git a/docs/contributing.rst b/docs/contributing.rst index 3151bcd..8c8a49b 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -35,6 +35,10 @@ environment:: $ make test +You can enable coverage measurement during tests:: + + $ make coverage + You can also run the test suite on all supported versions of Django and Python:: diff --git a/requirements_dev.txt b/requirements_dev.txt index 9a4520a..9665bf5 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -9,6 +9,7 @@ sqlparse # Testing +coverage flake8 tox |