Permalink
Browse files

Adding tox based tests for all current python and Django installations.

  • Loading branch information...
1 parent 96f2035 commit b2aec4ad4bbf24ad0e8d38d60a0ea8954de1365c @gregmuellegger committed Jun 26, 2012
Showing with 78 additions and 7 deletions.
  1. +1 −0 .gitignore
  2. +0 −5 requirements.txt
  3. +4 −0 requirements/tests.txt
  4. +0 −1 setup.py
  5. +1 −0 sortedm2m_tests/south_support/tests.py
  6. +0 −1 test_project/settings.py
  7. +72 −0 tox.ini
View
1 .gitignore
@@ -5,3 +5,4 @@
coverage.xml
db.sqlite
pep8.txt
+.tox
View
5 requirements.txt
@@ -1,5 +0,0 @@
-Django==1.3
-django-extensions
-django-setuptest
-ipython
-south
View
4 requirements/tests.txt
@@ -0,0 +1,4 @@
+https://github.com/gregmuellegger/django-setuptest/tarball/master#egg=django-setuptest
+argparse
+South
+mock
View
1 setup.py
@@ -71,7 +71,6 @@ def split(self, *args, **kw):
'Programming Language :: Python',
],
install_requires = [],
- tests_require=['Django', 'South', 'django-setuptest', 'mock'],
test_suite='sortedm2m_tests.SetupTestSuite',
)
View
1 sortedm2m_tests/south_support/tests.py
@@ -1,3 +1,4 @@
+from __future__ import with_statement
import mock
from django.core.management import call_command
from django.test import TestCase
View
1 test_project/settings.py
@@ -69,7 +69,6 @@
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.staticfiles',
- 'django_extensions',
'south',
View
72 tox.ini
@@ -0,0 +1,72 @@
+[tox]
+envlist =
+ py25-1.3,
+ py26-1.3, py26-1.4, py26-trunk,
+ py27-1.3, py27-1.4, py27-trunk,
+ pypy-1.3, pypy-1.4, pypy-trunk,
+
+[testenv]
+commands = python setup.py test
+setenv =
+ DJANGO_SETTINGS_MODULE = test_settings
+
+[testenv:py25-1.3]
+basepython = python2.5
+deps =
+ Django==1.3.1
+ -r{toxinidir}/requirements/tests.txt
+
+[testenv:py26-1.3]
+basepython = python2.6
+deps =
+ Django==1.3.1
+ -r{toxinidir}/requirements/tests.txt
+
+[testenv:py26-1.4]
+basepython = python2.6
+deps =
+ Django==1.4
+ -r{toxinidir}/requirements/tests.txt
+
+[testenv:py26-trunk]
+basepython = python2.6
+deps =
+ https://github.com/django/django/tarball/master#egg=Django
+ -r{toxinidir}/requirements/tests.txt
+
+[testenv:py27-1.3]
+basepython = python2.7
+deps =
+ Django==1.3.1
+ -r{toxinidir}/requirements/tests.txt
+
+[testenv:py27-1.4]
+basepython = python2.7
+deps =
+ Django==1.4
+ -r{toxinidir}/requirements/tests.txt
+
+[testenv:py27-trunk]
+basepython = python2.7
+deps =
+ https://github.com/django/django/tarball/master#egg=Django
+ -r{toxinidir}/requirements/tests.txt
+
+[testenv:pypy-1.3]
+basepython = pypy
+deps =
+ Django==1.3.1
+ -r{toxinidir}/requirements/tests.txt
+
+[testenv:pypy-1.4]
+basepython = pypy
+deps =
+ Django==1.4
+ -r{toxinidir}/requirements/tests.txt
+
+[testenv:pypy-trunk]
+basepython = pypy
+deps =
+ https://github.com/django/django/tarball/master#egg=Django
+ -r{toxinidir}/requirements/tests.txt
+

0 comments on commit b2aec4a

Please sign in to comment.