diff --git a/.gitignore b/.gitignore index 462f96c..e5a44d3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ /static/ /.coverage /htmlcov/ +/test_failures.txt +/test_rerun.txt diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bf6897a --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +APPENDCOV = $(shell test -s test_rerun.txt && echo "-a") + +test: + coverage run $(APPENDCOV) \ + --source "duckbook,booking,api,accounts" \ + manage.py test `cat test_rerun.txt` + coverage html + coverage report diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..28bbced --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,4 @@ +-r requirements.txt +coverage==4.0.1 +django-coverage-plugin==1.0 +django-juno-testrunner==0.3.1 diff --git a/duckbook/settings.py b/duckbook/settings.py index 65ce096..7e14698 100644 --- a/duckbook/settings.py +++ b/duckbook/settings.py @@ -87,6 +87,8 @@ USE_TZ = True STATIC_URL = '/static/' STATIC_ROOT = 'static' +TEST_RUNNER = 'junorunner.testrunner.TestSuiteRunner' + MAX_DUCK_LEVEL = 5 COMP_WARN_LEVEL = 2 MIN_FUZZY_SIMILARITY = 75