Permalink
Browse files

Add tox.ini

This tests python 2.6 and 2.7 with Django 1.4 and 1.5.

The tests all pass fine with django 1.4, but they fail with django
1.5.

NB: I'm "faking" the python 2.6 tests on my system since I don't
have python 2.6 available. But travis is running 2.6 and 2.7, so
there you go.
  • Loading branch information...
1 parent 1eb2e9c commit c1de602802c0e09e2cc920e26a6d698e3fc915d2 @willkg willkg committed Aug 22, 2013
Showing with 31 additions and 0 deletions.
  1. +31 −0 tox.ini
View
31 tox.ini
@@ -0,0 +1,31 @@
+# Tox (http://tox.testrun.org/) is a tool for running tests
+# in multiple virtualenvs. This configuration file will run the
+# test suite on all supported python versions. To use it, "pip install tox"
+# and then run "tox" from this directory.
+
+[tox]
+envlist = py26_dj14, py27_dj14, py26_dj15, py27_dj15
+
+[testenv:py26_dj14]
+basepython = python2.6
+commands = pip install django==1.4.6
+ pip install -r requirements/dev.txt
+ {envpython} manage.py test -v2 badger
+
+[testenv:py27_dj14]
+basepython = python2.7
+commands = pip install django==1.4.6
+ pip install -r requirements/dev.txt
+ {envpython} manage.py test -v2 badger
+
+[testenv:py26_dj15]
+basepython = python2.6
+commands = pip install django==1.5.2
+ pip install -r requirements/dev.txt
+ {envpython} manage.py test -v2 badger
+
+[testenv:py27_dj15]
+basepython = python2.7
+commands = pip install django==1.5.2
+ pip install -r requirements/dev.txt
+ {envpython} manage.py test -v2 badger

2 comments on commit c1de602

@lmorchard
Owner

Belated 👍 - never gotten around to using tox before myself, so this is great! Hmm, but I did get some errors when I tried it. Not sure what's up with that

@lmorchard
Owner

Hmm, this seems to have fixed the tox / pip errors for me:

sudo pip install --upgrade --force-reinstall tox

For some reason, even though I had pip 1.4.1 installed globally, it was installing pip 1.3.1 in the tox virtualenvs.

Please sign in to comment.