Skip to content

Commit

Permalink
fix test run under django 1.8, refs #19
Browse files Browse the repository at this point in the history
  • Loading branch information
st4lk committed Apr 12, 2015
1 parent d396e96 commit 870f25e
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ env:
- TOXENV=py33-15
- TOXENV=py33-16
- TOXENV=py33-17
- TOXENV=py33-18
- TOXENV=py34-17
- TOXENV=py34-18
- TOXENV=py27-14
- TOXENV=py27-15
- TOXENV=py27-16
- TOXENV=py27-17
- TOXENV=py27-18


branches:
Expand Down
20 changes: 16 additions & 4 deletions example/example/settings_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
from .settings import *
from django import VERSION

INSTALLED_APPS += (
'django_nose',
)
if VERSION < (1, 8):
INSTALLED_APPS += (
'django_nose',
)

TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'


DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
'USER': '',
'PASSWORD': '',
'TEST_CHARSET': 'utf8',
}}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
django>=1.4,<1.8
django>=1.4,<1.9
45 changes: 39 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ envlist=
py33-16,
py27-17,
py33-17,
py34-17
py34-17,
py27-18,
py33-18,
py34-18

[testenv]
deps =
django-nose==1.2
django-nose==1.3
commands =
{envpython} example/manage.py test tests --settings=example.settings_test --exe
{envpython} example/manage.py test tests --settings=example.settings_test

[testenv:py26-14]
basepython = python2.6
Expand Down Expand Up @@ -67,12 +70,30 @@ deps =
django==1.6.7
{[testenv]deps}

[testenv:py32-16]
basepython = python3.2
deps =
django==1.6.7
{[testenv]deps}

[testenv:py33-16]
basepython = python3.3
deps =
django==1.6.7
{[testenv]deps}

[testenv:py32-17]
basepython = python3.2
deps =
django==1.7
{[testenv]deps}

[testenv:py27-17]
basepython = python2.7
deps =
django==1.7
{[testenv]deps}

[testenv:py33-17]
basepython = python3.3
deps =
Expand All @@ -85,14 +106,26 @@ deps =
django==1.7
{[testenv]deps}

[testenv:py27-17]
[testenv:py33-18]
basepython = python3.3
deps =
django==1.8
{[testenv]deps}

[testenv:py34-18]
basepython = python3.4
deps =
django==1.8
{[testenv]deps}

[testenv:py27-18]
basepython = python2.7
deps =
coverage
django==1.7
django==1.8
{[testenv]deps}

commands =
coverage run --source=solid_i18n example/manage.py test tests --settings=example.settings_test --exe
coverage run --source=solid_i18n example/manage.py test tests --settings=example.settings_test
coverage report

0 comments on commit 870f25e

Please sign in to comment.