-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from sergei-maertens/master
Fix issue #25 and move to Tox for unit testing different build matrices
- Loading branch information
Showing
7 changed files
with
68 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ source = djchoices | |
omit = */tests/* | ||
exclude_lines = | ||
pragma: no cover | ||
|
||
[html] | ||
directory = cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ dist/ | |
*.pyc | ||
.project | ||
.pydevproject | ||
.tox | ||
|
||
# coverage | ||
htmlcov | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,41 @@ | ||
language: python | ||
sudo: false | ||
|
||
python: | ||
- "2.6" | ||
- "2.7" | ||
- "3.3" | ||
- "3.4" | ||
- "pypy" | ||
install: | ||
- pip install coverage coveralls tox | ||
script: | ||
- tox | ||
after_success: | ||
- coveralls | ||
|
||
env: | ||
- DJANGO_VERSION=1.3.7 | ||
- DJANGO_VERSION=1.4.22 | ||
- DJANGO_VERSION=1.5.12 | ||
- DJANGO_VERSION=1.6.11 | ||
- DJANGO_VERSION=1.7.10 | ||
- DJANGO_VERSION=1.8.4 | ||
- TOXENV=py26-django13 | ||
- TOXENV=py26-django14 | ||
- TOXENV=py26-django15 | ||
- TOXENV=py26-django16 | ||
|
||
matrix: | ||
exclude: | ||
- python: "2.6" | ||
env: DJANGO_VERSION=1.7.10 | ||
- python: "2.6" | ||
env: DJANGO_VERSION=1.8.4 | ||
- python: "3.3" | ||
env: DJANGO_VERSION=1.3.7 | ||
- python: "3.3" | ||
env: DJANGO_VERSION=1.4.22 | ||
- python: "3.4" | ||
env: DJANGO_VERSION=1.3.7 | ||
- python: "3.4" | ||
env: DJANGO_VERSION=1.4.22 | ||
- TOXENV=py27-django13 | ||
- TOXENV=py27-django14 | ||
- TOXENV=py27-django15 | ||
- TOXENV=py27-django16 | ||
- TOXENV=py27-django17 | ||
- TOXENV=py27-django18 | ||
- TOXENV=py27-djangolatest | ||
|
||
# command to install dependencies | ||
install: | ||
- "pip install -q Django==$DJANGO_VERSION --use-mirrors" | ||
- "if [[ $DJANGO_VERSION < 1.5 ]]; then pip install -q six --use-mirrors; fi" | ||
- "if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install -q unittest2; fi" | ||
- "pip install coverage coveralls" | ||
- TOXENV=py33-django15 | ||
- TOXENV=py33-django16 | ||
- TOXENV=py33-django17 | ||
- TOXENV=py33-django18 | ||
- TOXENV=py33-djangolatest | ||
|
||
# command to run tests | ||
script: coverage run runtests.py | ||
- TOXENV=py34-django15 | ||
- TOXENV=py34-django16 | ||
- TOXENV=py34-django17 | ||
- TOXENV=py34-django18 | ||
- TOXENV=py34-djangolatest | ||
|
||
after_success: | ||
- coveralls | ||
- TOXENV=pypy-django15 | ||
- TOXENV=pypy-django16 | ||
- TOXENV=pypy-django17 | ||
- TOXENV=pypy-django18 | ||
- TOXENV=pypy-djangolatest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
from pkg_resources import get_distribution | ||
|
||
from djchoices.choices import ChoiceItem, DjangoChoices, C | ||
|
||
__version__ = '1.4.1' | ||
__version__ = get_distribution('django-choices').version | ||
|
||
__all__ = ["ChoiceItem", "DjangoChoices", "C"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,18 @@ | ||
from os import path | ||
from setuptools import setup, find_packages | ||
|
||
try: | ||
from django.utils import six | ||
except ImportError: | ||
REQUIRE_SIX = True | ||
else: | ||
REQUIRE_SIX = False | ||
|
||
from djchoices import __version__ | ||
|
||
with open(path.join(path.dirname(__file__), 'README.rst')) as f: | ||
readme = f.read() | ||
|
||
setup( | ||
name="django-choices", | ||
version=__version__, | ||
version='1.4.2', | ||
license="MIT", | ||
description="Sanity for the django choices functionality.", | ||
long_description=readme, | ||
install_requires=['Django>=1.3'] + (['six'] if REQUIRE_SIX else []), | ||
install_requires=['Django>=1.3', 'six'], | ||
test_suite='runtests.get_suite', | ||
url="https://github.com/bigjason/django-choices", | ||
author="Jason Webb", | ||
author_email="[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[tox] | ||
envlist = py{26,27}-django{13,14,15,16},py27-django{17,18,latest},py{33,34,py}-django{15,16,17,18,latest} | ||
skip_missing_interpreters = true | ||
|
||
[testenv] | ||
deps= | ||
django13: Django>=1.3,<1.4 | ||
django14: Django>=1.4,<1.5 | ||
django15: Django>=1.5,<1.6 | ||
django16: Django>=1.6,<1.7 | ||
django17: Django>=1.7,<1.8 | ||
django18: Django>=1.8,<1.9 | ||
py26: unittest2 | ||
django13,django14: six | ||
coverage | ||
coveralls | ||
commands=coverage run --rcfile={toxinidir}/.coveragerc {toxinidir}/setup.py test |