Skip to content
Browse files

Ported tests to run via tox and Travis.

  • Loading branch information...
1 parent ed8d284 commit 7dbe8c063f822de2e4d76a25815ec83313ee1551 @jezdez jezdez committed
Showing with 170 additions and 48 deletions.
  1. +23 −19 .travis.yml
  2. +0 −17 tasks.py
  3. +0 −2 test_project/test_project/settings.py
  4. +0 −10 tests/requirements.txt
  5. +147 −0 tox.ini
View
42 .travis.yml
@@ -1,25 +1,29 @@
language: python
-python:
- - 2.6
- - 2.7
- - 3.2
- - 3.3
+env:
+ - TOXENV=py26-1.4.x
+ - TOXENV=py26-1.5.x
+ - TOXENV=py26-1.6.x
+ - TOXENV=py26-1.7.x
+ - TOXENV=py27-1.4.x
+ - TOXENV=py27-1.5.x
+ - TOXENV=py27-1.6.x
+ - TOXENV=py27-1.7.x
+ - TOXENV=py32-1.5.x
+ - TOXENV=py32-1.6.x
+ - TOXENV=py32-1.7.x
+ - TOXENV=py33-1.5.x
+ - TOXENV=py33-1.6.x
+ - TOXENV=py33-1.7.x
+ - TOXENV=pypy-1.4.x
+ - TOXENV=pypy-1.5.x
+ - TOXENV=pypy-1.6.x
+ - TOXENV=pypy-1.7.x
+ - TOXENV=flake827
+ - TOXENV=flake833
install:
- - pip install -e .
- - pip install -r tests/requirements.txt
- - pip install https://github.com/django/django/archive/${DJANGO}.zip#egg=django
+ - pip install tox
script:
- - inv test
-env:
- - DJANGO=1.4.6
- - DJANGO=1.5.2
- - DJANGO=stable/1.6.x
-matrix:
- exclude:
- - python: 3.2
- env: DJANGO=1.4.6
- - python: 3.3
- env: DJANGO=1.4.6
+ - tox
branches:
except:
templates/1.5.x
View
17 tasks.py
@@ -1,17 +0,0 @@
-from invoke import run, task
-
-
-@task
-def test(label='tests'):
- run('flake8 configurations --ignore=E501,E127,E128,E124')
- run('./manage.py test {0} -v2'.format(label))
-
-
-@task
-def release():
- run('python setup.py sdist bdist_wheel register upload -s')
-
-
-@task
-def docs():
- run('cd docs; make html; cd ..')
View
2 test_project/test_project/settings.py
@@ -129,7 +129,6 @@ class Base(Configuration):
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'configurations',
- 'django_extensions',
)
# A sample logging configuration. The only tangible logging
@@ -173,7 +172,6 @@ class Base(Configuration):
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'configurations',
- 'django_extensions',
)
View
10 tests/requirements.txt
@@ -1,10 +0,0 @@
-flake8
-coverage
-django-discover-runner
-mock
-dj-database-url
-dj-email-url
-django-cache-url>=0.6.0
-# use a unreleased version of invoke since it's compatible with 3.2
-https://github.com/pyinvoke/invoke/archive/771110190ddb729913e8afc67724b84f42e6176d.zip
-six
View
147 tox.ini
@@ -0,0 +1,147 @@
+[tox]
+; envlist = py26,py27,pypy,py32,py33,flake827,flake833
+;envlist = py26-1.4.x
+
+[testenv]
+skipsdist = True
+usedevelop = True
+deps =
+ flake8
+ coverage
+ django-discover-runner
+ mock
+ dj-database-url
+ dj-email-url
+ django-cache-url>=0.6.0
+ six
+deps14 =
+ https://github.com/django/django/archive/stable/1.4.x.zip#egg=django
+deps15 =
+ https://github.com/django/django/archive/stable/1.5.x.zip#egg=django
+deps16 =
+ https://github.com/django/django/archive/stable/1.6.x.zip#egg=django
+deps17 =
+ https://github.com/django/django/archive/master.zip#egg=django
+
+commands =
+ python manage.py test -v2 {posargs:tests}
+
+
+[testenv:flake827]
+basepython = python2.7
+deps = flake8
+commands = flake8 configurations --ignore=E501,E127,E128,E124
+
+[testenv:flake833]
+basepython = python3.3
+deps = flake8
+commands = flake8 configurations --ignore=E501,E127,E128,E124
+
+
+[testenv:py26-1.4.x]
+basepython = python2.6
+deps =
+ {[testenv]deps}
+ {[testenv]deps14}
+
+[testenv:py26-1.5.x]
+basepython = python2.6
+deps =
+ {[testenv]deps}
+ {[testenv]deps15}
+
+[testenv:py26-1.6.x]
+basepython = python2.6
+deps =
+ {[testenv]deps}
+ {[testenv]deps16}
+
+[testenv:py26-1.7.x]
+basepython = python2.6
+deps =
+ {[testenv]deps}
+ {[testenv]deps17}
+
+[testenv:py27-1.4.x]
+basepython = python2.7
+deps =
+ {[testenv]deps}
+ {[testenv]deps14}
+
+[testenv:py27-1.5.x]
+basepython = python2.7
+deps =
+ {[testenv]deps}
+ {[testenv]deps15}
+
+[testenv:py27-1.6.x]
+basepython = python2.7
+deps =
+ {[testenv]deps}
+ {[testenv]deps16}
+
+[testenv:py27-1.7.x]
+basepython = python2.7
+deps =
+ {[testenv]deps}
+ {[testenv]deps17}
+
+[testenv:py32-1.5.x]
+basepython = python3.2
+deps =
+ {[testenv]deps}
+ {[testenv]deps15}
+
+[testenv:py32-1.6.x]
+basepython = python3.2
+deps =
+ {[testenv]deps}
+ {[testenv]deps16}
+
+[testenv:py32-1.7.x]
+basepython = python3.2
+deps =
+ {[testenv]deps}
+ {[testenv]deps17}
+
+[testenv:py33-1.5.x]
+basepython = python3.3
+deps =
+ {[testenv]deps}
+ {[testenv]deps15}
+
+[testenv:py33-1.6.x]
+basepython = python3.3
+deps =
+ {[testenv]deps}
+ {[testenv]deps16}
+
+[testenv:py33-1.7.x]
+basepython = python3.3
+deps =
+ {[testenv]deps}
+ {[testenv]deps17}
+
+[testenv:pypy-1.4.x]
+basepython = pypy
+deps =
+ {[testenv]deps}
+ {[testenv]deps14}
+
+[testenv:pypy-1.5.x]
+basepython = pypy
+deps =
+ {[testenv]deps}
+ {[testenv]deps15}
+
+[testenv:pypy-1.6.x]
+basepython = pypy
+deps =
+ {[testenv]deps}
+ {[testenv]deps16}
+
+[testenv:pypy-1.7.x]
+basepython = pypy
+deps =
+ {[testenv]deps}
+ {[testenv]deps17}

0 comments on commit 7dbe8c0

Please sign in to comment.
Something went wrong with that request. Please try again.