Skip to content

Commit

Permalink
Test with more versions in Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Apr 15, 2015
1 parent a0aa2f3 commit 4127d2b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ language: python

python:
- 2.7
- 3.3
- 3.4

env:
- DJANGO_VERSION=1.4.10
- DJANGO_VERSION=1.5.5
- DJANGO_VERSION=1.6.1
- DJANGO_VERSION=1.5.12
- DJANGO_VERSION=1.6.11
- DJANGO_VERSION=1.7.5
- DJANGO_VERSION=1.8

before_install:
- sudo apt-get update > /dev/null
Expand Down Expand Up @@ -42,5 +44,5 @@ after_success:

matrix:
exclude:
- python: 3.3
- python: 3.4
env: DJANGO_VERSION=1.4.10
13 changes: 11 additions & 2 deletions quicktest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,17 @@ def run_tests(self):
},
INSTALLED_APPS=self.INSTALLED_APPS + self.apps,
)
from django.test.simple import DjangoTestSuiteRunner
failures = DjangoTestSuiteRunner().run_tests(self.apps, verbosity=1)

if django.VERSION >= (1, 7, 0):
# see: https://docs.djangoproject.com/en/dev/releases/1.7/#standalone-scripts
django.setup()
if django.VERSION >= (1, 6, 0):
# see: https://docs.djangoproject.com/en/dev/releases/1.6/#discovery-of-tests-in-any-test-module
from django.test.runner import DiscoverRunner as Runner
else:
from django.test.simple import DjangoTestSuiteRunner as Runner

failures = Runner().run_tests(self.apps, verbosity=1)
if failures: # pragma: no cover
sys.exit(failures)

Expand Down

0 comments on commit 4127d2b

Please sign in to comment.