From 67eaccdc73ff1a5114c58f3aa480e094b81cb393 Mon Sep 17 00:00:00 2001 From: Tom Walker Date: Fri, 28 Nov 2014 14:12:11 +0000 Subject: [PATCH] updated tox to run with python 2.7, 3.3 and 3.4. Tests done on Django 1.5, 1.6 and 1.7 --- runtests.py | 3 +++ tox.ini | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/runtests.py b/runtests.py index 79ab62f..1c35933 100644 --- a/runtests.py +++ b/runtests.py @@ -4,11 +4,14 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'test-settings' test_dir = os.path.dirname(__file__) sys.path.insert(0, test_dir) +import django from django.test.utils import get_runner from django.conf import settings def runtests(): + if django.VERSION >= (1, 7): + django.setup() TestRunner = get_runner(settings) test_runner = TestRunner(verbosity=1, interactive=True) failures = test_runner.run_tests( diff --git a/tox.ini b/tox.ini index 6dd8f87..eb80323 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,61 @@ [tox] -envlist = py27,py33,py34 +envlist = + py27-django15, + py33-django15, + py27-django16, + py33-django16, + py27-django17, + py33-django17, + py34-django17 [testenv] -deps=-rrequirements.txt -commands=python setup.py test +commands = python setup.py test +deps = + django-model-utils + Pillow + +setenv = + PYTHONPATH = {toxinidir} + + +[testenv:py27-django15] +basepython = python2.7 +deps = + Django>=1.5,<1.6 + {[testenv]deps} + +[testenv:py33-django15] +basepython = python3.3 +deps = + Django>=1.5,<1.6 + {[testenv]deps} + +[testenv:py27-django16] +basepython = python2.7 +deps = + Django>=1.6,<1.7 + {[testenv]deps} + +[testenv:py33-django16] +basepython = python3.3 +deps = + Django>=1.6,<1.7 + {[testenv]deps} + +[testenv:py27-django17] +basepython = python2.7 +deps = + Django>=1.7,<1.8 + {[testenv]deps} + +[testenv:py33-django17] +basepython = python3.3 +deps = + Django>=1.7,<1.8 + {[testenv]deps} + +[testenv:py34-django17] +basepython = python3.4 +deps = + Django>=1.7,<1.8 + {[testenv]deps} -- 2.39.5