Skip to content

Commit

Permalink
Update tests for python3.4, drop django1.4 support
Browse files Browse the repository at this point in the history
Tests were failing for django 1.4 which ended its extended support
period yesterday, so I removed it from the tests. Tox now supports a
much nicer parametrized configuration, so I updated tox.ini to use it.

I tried adding Django 1.8 to the tests, but the tests were failing.
They should be fixed in a separate commit.
  • Loading branch information
julianandrews committed Oct 2, 2015
1 parent 4effd43 commit 6cc9e98
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 72 deletions.
5 changes: 4 additions & 1 deletion tests/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
import sys
import warnings

warnings.simplefilter('error')

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings")

from django.core.management import execute_from_command_line

# Python 3.4 raises deprecation warnings on import for django 1.5-1.7.
# We can ignore those by not setting the filter until after import.
warnings.simplefilter('error')

execute_from_command_line(sys.argv)
81 changes: 10 additions & 71 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,77 +1,16 @@
[tox]
envlist=
py26-dj14,
py27-dj14,
py27-dj15,
py27-dj16,
py27-dj17,
py33-dj15,
py33-dj16,
py33-dj17
{py27,py34}-{dj15,dj16,dj17}

[testenv]
commands=/usr/bin/env make test

[testenv:py27-dj14]
basepython=python2.7
deps =
https://github.com/django/django/archive/stable/1.4.x.zip#egg=Django
# https://bitbucket.org/hpk42/tox/issue/13/tox-should-reuse-tests_require
mock
six

[testenv:py27-dj15]
basepython=python2.7
deps =
https://github.com/django/django/archive/stable/1.5.x.zip#egg=Django
# https://bitbucket.org/hpk42/tox/issue/13/tox-should-reuse-tests_require
mock
six

[testenv:py27-dj16]
basepython=python2.7
deps =
https://github.com/django/django/archive/stable/1.6.x.zip#egg=Django
# https://bitbucket.org/hpk42/tox/issue/13/tox-should-reuse-tests_require
mock
six

[testenv:py27-dj17]
basepython=python2.7
deps =
https://github.com/django/django/archive/stable/1.7.x.zip#egg=Django
# https://bitbucket.org/hpk42/tox/issue/13/tox-should-reuse-tests_require
mock
six

[testenv:py33-dj15]
basepython=python3.3
deps =
https://github.com/django/django/archive/stable/1.5.x.zip#egg=Django
# https://bitbucket.org/hpk42/tox/issue/13/tox-should-reuse-tests_require
mock
six

[testenv:py33-dj16]
basepython=python3.3
deps =
https://github.com/django/django/archive/stable/1.6.x.zip#egg=Django
# https://bitbucket.org/hpk42/tox/issue/13/tox-should-reuse-tests_require
mock
six

[testenv:py33-dj17]
basepython=python3.3
deps =
https://github.com/django/django/archive/stable/1.7.x.zip#egg=Django
# https://bitbucket.org/hpk42/tox/issue/13/tox-should-reuse-tests_require
mock
six

[testenv:py26-dj14]
basepython=python2.6
deps =
Django==1.4.8
# https://bitbucket.org/hpk42/tox/issue/13/tox-should-reuse-tests_require
commands=
/usr/bin/env make test
basepython=
py27: python2.7
py34: python3.4
deps =
dj15: Django>=1.5,<1.6
dj16: Django>=1.6,<1.7
dj17: Django>=1.7,<1.8
mock
six

0 comments on commit 6cc9e98

Please sign in to comment.