Permalink
Browse files

Update testing suite

  • Loading branch information...
nkuttler committed Feb 29, 2016
1 parent 508dd7a commit 22712ba5d2a8646dd3419e4dcbd3904911622e02
Showing with 19 additions and 24 deletions.
  1. +4 −3 .travis.yml
  2. +4 −0 README.rst
  3. +11 −21 quicktest.py
View
@@ -1,13 +1,14 @@
language: python
+sudo: False
python:
- 2.7
- 3.4
- 3.5
env:
- - DJANGO_VERSION=Django==1.8.9
- - DJANGO_VERSION=Django==1.9.1
+ - DJANGO_VERSION=Django<1.9
+ - DJANGO_VERSION=Django<1.10
install:
- - pip install -q --use-mirrors $DJANGO_VERSION
+ - pip install -q $DJANGO_VERSION
- python setup.py install -q
script: make test
notifications:
View
@@ -94,6 +94,10 @@ modify the app.
Changelog
=========
+0.3.1 ()
+--------
+- Use docker-based travis testing
+
0.3.0 (2016-02-20)
------------------
- Python 2.7 and Django 1.8 are required
View
@@ -7,7 +7,9 @@
import sys
import argparse
+from django import setup
from django.conf import settings
+from django.test.runner import DiscoverRunner
class QuickDjangoTest(object):
@@ -40,8 +42,8 @@ def _tests(self):
Fire up the Django test suite developed for version 1.2
"""
settings.configure(
- DEBUG = True,
- DATABASES = {
+ DEBUG=True,
+ DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(self.DIRNAME, 'database.db'),
@@ -51,29 +53,17 @@ def _tests(self):
'PORT': '',
}
},
- INSTALLED_APPS = self.INSTALLED_APPS + tuple(self.apps),
- WEBMASTER_VERIFICATION = self._get_wv_config(),
- ROOT_URLCONF = 'test_project.urls',
- TEMPLATE_DIRS = (
+ INSTALLED_APPS=self.INSTALLED_APPS + tuple(self.apps),
+ WEBMASTER_VERIFICATION=self._get_wv_config(),
+ ROOT_URLCONF='test_project.urls',
+ TEMPLATE_DIRS=(
'./test_project/templates/',
),
)
- # Django 1.7
- import django
- if hasattr(django, 'setup'):
- django.setup()
-
- try:
- from django.test.simple import DjangoTestSuiteRunner
- failures = DjangoTestSuiteRunner().run_tests(self.apps,
- verbosity=1)
- if failures:
- sys.exit(failures)
- except ImportError:
- # Django 1.8
- from django.test.runner import DiscoverRunner
- DiscoverRunner().run_tests(self.apps, verbosity=1)
+ # Django 1.8
+ setup()
+ DiscoverRunner().run_tests(self.apps, verbosity=1)
def _get_wv_config(self, key='default'):
if self.multicode:

0 comments on commit 22712ba

Please sign in to comment.