Use newer discover runner and test on Python 3.3 and Django master
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@ MANIFEST
|
||||
*.egg-info
|
||||
*.egg
|
||||
docs/_build/
|
||||
.coverage
|
||||
21
.travis.yml
21
.travis.yml
@@ -4,6 +4,7 @@ python:
|
||||
- "2.6"
|
||||
- "2.7"
|
||||
- "3.2"
|
||||
- "3.3"
|
||||
before_install:
|
||||
- export PIP_USE_MIRRORS=true
|
||||
- export PIP_INDEX_URL=https://simple.crate.io/
|
||||
@@ -18,18 +19,20 @@ script:
|
||||
- coverage run --branch --source=appconf `which django-admin.py` test appconf
|
||||
- coverage report --omit=appconf/test*
|
||||
env:
|
||||
- DJANGO=1.3.5
|
||||
- DJANGO=1.4.3
|
||||
- DJANGO=1.5b2
|
||||
branches:
|
||||
except:
|
||||
- master
|
||||
- DJANGO=1.3.7
|
||||
- DJANGO=1.4.5
|
||||
- DJANGO=1.5.1
|
||||
- DJANGO=master
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- python: "2.5"
|
||||
env: DJANGO=1.5b2
|
||||
env: DJANGO=1.5.1
|
||||
- python: "3.2"
|
||||
env: DJANGO=1.3.5
|
||||
env: DJANGO=1.3.7
|
||||
- python: "3.2"
|
||||
env: DJANGO=1.4.3
|
||||
env: DJANGO=1.4.5
|
||||
- python: "3.3"
|
||||
env: DJANGO=1.3.7
|
||||
- python: "3.3"
|
||||
env: DJANGO=1.4.5
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import django
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
DATABASES = {
|
||||
@@ -15,5 +17,7 @@ INSTALLED_APPS = [
|
||||
'appconf.tests',
|
||||
]
|
||||
|
||||
TEST_RUNNER = 'discover_runner.DiscoverRunner'
|
||||
if django.VERSION[:2] < (1, 6):
|
||||
TEST_RUNNER = 'discover_runner.DiscoverRunner'
|
||||
|
||||
SECRET_KEY = 'local'
|
||||
|
||||
@@ -61,5 +61,6 @@ class CustomHolderConf(AppConf):
|
||||
SIMPLE_VALUE = True
|
||||
|
||||
class Meta:
|
||||
holder = 'appconf.tests.models.custom_holder' # instead of django.conf.settings
|
||||
# instead of django.conf.settings
|
||||
holder = 'appconf.tests.models.custom_holder'
|
||||
prefix = 'custom_holder'
|
||||
|
||||
@@ -4,8 +4,8 @@ from django.core.exceptions import ImproperlyConfigured
|
||||
from django.test import TestCase
|
||||
|
||||
from appconf.tests.models import (AppConf, TestConf, PrefixConf,
|
||||
YetAnotherPrefixConf, SeparateConf, ProxyConf,
|
||||
CustomHolderConf, custom_holder)
|
||||
YetAnotherPrefixConf, SeparateConf,
|
||||
ProxyConf, CustomHolderConf, custom_holder)
|
||||
|
||||
|
||||
class TestConfTests(TestCase):
|
||||
@@ -29,11 +29,13 @@ class TestConfTests(TestCase):
|
||||
custom_conf = TestConf(CUSTOM_VALUE='custom')
|
||||
self.assertEquals(custom_conf.CUSTOM_VALUE, 'custom')
|
||||
self.assertEquals(settings.TESTS_CUSTOM_VALUE, 'custom')
|
||||
self.assertRaises(AttributeError, lambda: custom_conf.TESTS_CUSTOM_VALUE)
|
||||
self.assertRaises(AttributeError,
|
||||
lambda: custom_conf.TESTS_CUSTOM_VALUE)
|
||||
custom_conf.CUSTOM_VALUE_SETATTR = 'custom'
|
||||
self.assertEquals(settings.TESTS_CUSTOM_VALUE_SETATTR, 'custom')
|
||||
custom_conf.custom_value_lowercase = 'custom'
|
||||
self.assertRaises(AttributeError, lambda: settings.custom_value_lowercase)
|
||||
self.assertRaises(AttributeError,
|
||||
lambda: settings.custom_value_lowercase)
|
||||
|
||||
def test_init_kwargs_with_prefix(self):
|
||||
custom_conf = TestConf(TESTS_CUSTOM_VALUE2='custom2')
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
flake8
|
||||
coverage
|
||||
django-discover-runner==0.3
|
||||
django-discover-runner==1.0
|
||||
|
||||
Reference in New Issue
Block a user