]> git.parisson.com Git - django_quiz.git/commitdiff
updated tox to run with python 2.7, 3.3 and 3.4. Tests done on Django
authorTom Walker <tomwalker0472@gmail.com>
Fri, 28 Nov 2014 14:12:11 +0000 (14:12 +0000)
committerTom Walker <tomwalker0472@gmail.com>
Fri, 28 Nov 2014 14:12:11 +0000 (14:12 +0000)
1.5, 1.6 and 1.7

runtests.py
tox.ini

index 79ab62f2cc2128932d478f5978684e298ee03504..1c359333395c19ed322fc04a147f52e90640146d 100644 (file)
@@ -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 6dd8f87a1f5323f5d69ca60e1cddce8b97304d8a..eb803231f43be98281d4c0144c54ce892530361b 100644 (file)
--- 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}