diff --git a/.coverage.rc b/.coverage.rc index aae6480..69fbbd9 100644 --- a/.coverage.rc +++ b/.coverage.rc @@ -1,6 +1,6 @@ [run] -source = - dpaste +parallel = True +source = dpaste branch = True omit = dpaste/migrations/* @@ -10,3 +10,6 @@ omit = exclude_lines = pragma: no cover def __repr__ + +[html] +directory = /tmp/coverage_html_report diff --git a/.travis.yml b/.travis.yml index abb2e00..d4517bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,9 @@ python: - "2.7" - "3.3" install: + - "pip install Django==1.6 - "pip install -e ." - - "pip install -r requirements.txt" script: - coverage run --rcfile=.coverage.rc manage.py test + coverage run --rcfile=.coverage.rc runtests.py after_success: coveralls --config_file=.coverage.rc --coveralls_yaml=.coveralls.yml diff --git a/runtests.py b/runtests.py new file mode 100644 index 0000000..0037b20 --- /dev/null +++ b/runtests.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +import sys +from django.conf import settings + +if not settings.configured: + settings.configure( + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': 'dev.db', + } + }, + INSTALLED_APPS=[ + 'django.contrib.sessions', + 'django.contrib.staticfiles', + 'mptt', + 'dpaste', + ], + + STATIC_ROOT='/tmp/dpaste_test_static/', + STATIC_URL='/static/', + ROOT_URLCONF='dpaste.urls', + ) + +def runtests(*test_args): + from django.test.simple import DjangoTestSuiteRunner + test_runner = DjangoTestSuiteRunner(verbosity=1) + failures = test_runner.run_tests(['dpaste', ]) + if failures: + sys.exit(failures) + +if __name__ == '__main__': + runtests(*sys.argv[1:]) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..bcea6ba --- /dev/null +++ b/tox.ini @@ -0,0 +1,23 @@ +[tox] +toxworkdir={toxinidir}/.tox +envlist= + py27-django-1.4, + py27-django-1.5, + py27-django-1.6, + py33-django-1.6, + +[testenv] +commands= + python runtests.py + +[testenv:py27-django-1.4] +deps=django==1.4 + +[testenv:py27-django-1.5] +deps=django==1.5 + +[testenv:py27-django-1.6] +deps=django==1.6 + +[testenv:py33-django-1.6] +deps=django==1.6