aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--Makefile14
-rw-r--r--docs/contributing.rst4
-rw-r--r--requirements_dev.txt1
4 files changed, 22 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 15863ab..a866e5d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/Makefile b/Makefile
index 22832c1..fb87b2f 100644
--- a/Makefile
+++ b/Makefile
@@ -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