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 #29 from develtech/refactor-tests
Refactor tests
- Loading branch information
Showing
8 changed files
with
139 additions
and
146 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 |
---|---|---|
@@ -1,66 +1,82 @@ | ||
sudo: false | ||
language: python | ||
python: | ||
- "3.6" | ||
- "3.5" | ||
- "3.4" | ||
- "3.3" | ||
- "2.7" | ||
- "2.6" | ||
- "pypy" | ||
env: | ||
- DJANGO="django>=1.3,<1.4" | ||
- DJANGO="django>=1.4,<1.5" | ||
- DJANGO="django>=1.5,<1.6" | ||
- DJANGO="django>=1.6,<1.7" | ||
- DJANGO="django>=1.7,<1.8" | ||
- DJANGO="django>=1.8,<1.9" | ||
- DJANGO="django>=1.9,<1.10" | ||
- DJANGO="django>=1.10,<1.11" | ||
- DJANGO="django>=1.11,<1.12" | ||
|
||
sudo: false | ||
|
||
matrix: | ||
exclude: | ||
- python: "3.5" | ||
env: DJANGO="django>=1.3,<1.4" | ||
- python: "3.5" | ||
env: DJANGO="django>=1.4,<1.5" | ||
- python: "3.5" | ||
env: DJANGO="django>=1.5,<1.6" | ||
- python: "3.5" | ||
env: DJANGO="django>=1.6,<1.7" | ||
- python: "3.5" | ||
env: DJANGO="django>=1.7,<1.8" | ||
- python: "3.5" | ||
env: DJANGO="django>=1.8,<1.9" | ||
- python: "3.4" | ||
env: DJANGO="django>=1.3,<1.4" | ||
- python: "3.4" | ||
env: DJANGO="django>=1.4,<1.5" | ||
- python: "3.3" | ||
env: DJANGO="django>=1.3,<1.4" | ||
- python: "3.3" | ||
env: DJANGO="django>=1.4,<1.5" | ||
- python: "3.3" | ||
env: DJANGO="https://github.com/django/django/tarball/stable/1.9.x#egg=django" | ||
- python: "2.6" | ||
env: DJANGO="django>=1.5,<1.6" | ||
- python: "2.6" | ||
env: DJANGO="django>=1.6,<1.7" | ||
- python: "2.6" | ||
env: DJANGO="django>=1.7,<1.8" | ||
- python: "2.6" | ||
env: DJANGO="django>=1.8,<1.9" | ||
- python: "2.6" | ||
env: DJANGO="https://github.com/django/django/tarball/stable/1.9.x#egg=django" | ||
fast_finish: true | ||
include: | ||
- python: 2.7 | ||
env: TOXENV=py27-flake8 | ||
- python: 3.4 | ||
env: TOXENV=py34-flake8 | ||
- python: 3.5 | ||
env: TOXENV=py35-flake8 | ||
- python: 3.6 | ||
env: TOXENV=py36-flake8 | ||
- python: 2.7 | ||
env: TOXENV=py27-isort | ||
- python: 3.6 | ||
env: TOXENV=py36-isort | ||
- python: 2.7 | ||
env: TOXENV=py27-dj18 | ||
- python: 2.7 | ||
env: TOXENV=py27-dj110 | ||
- python: 2.7 | ||
env: TOXENV=py27-dj111 | ||
- python: 3.3 | ||
env: TOXENV=py33-dj18 | ||
- python: 3.4 | ||
env: TOXENV=py34-dj18 | ||
- python: 3.4 | ||
env: TOXENV=py34-dj110 | ||
- python: 3.4 | ||
env: TOXENV=py34-dj111 | ||
- python: 3.5 | ||
env: TOXENV=py35-dj18 | ||
- python: 3.5 | ||
env: TOXENV=py35-dj110 | ||
- python: 3.5 | ||
env: TOXENV=py35-dj111 | ||
- python: 3.5 | ||
env: TOXENV=py35-djmaster | ||
- python: 3.6 | ||
env: TOXENV=py36-dj18 | ||
- python: 3.6 | ||
env: TOXENV=py36-dj110 | ||
- python: 3.6 | ||
env: TOXENV=py36-dj111 | ||
- python: 3.6 | ||
env: TOXENV=py36-djmaster | ||
- python: pypy | ||
env: TOXENV=pypy-dj18 | ||
- python: pypy | ||
env: TOXENV=pypy-dj110 | ||
- python: pypy | ||
env: TOXENV=pypy-dj111 | ||
- python: pypy3.5-5.8.0 | ||
env: TOXENV=pypy3-dj18 | ||
- python: pypy3.5-5.8.0 | ||
env: TOXENV=pypy3-dj110 | ||
- python: pypy3.5-5.8.0 | ||
env: TOXENV=pypy3-djmaster | ||
|
||
allow_failures: | ||
- python: 3.5 | ||
env: TOXENV=py35-djmaster | ||
- python: 3.6 | ||
env: TOXENV=py36-djmaster | ||
- python: pypy3.5-5.8.0 | ||
env: TOXENV=pypy3-dj18 | ||
- python: pypy3.5-5.8.0 | ||
env: TOXENV=pypy3-dj110 | ||
- python: pypy3.5-5.8.0 | ||
env: TOXENV=pypy3-djmaster | ||
|
||
install: | ||
- travis_retry pip install --upgrade pip -q | ||
- travis_retry pip install $DJANGO | ||
- travis_retry pip install lxml django-classy-tags django_appconf jinja2 -q | ||
- travis_retry pip install nose coverage flake8 flake8-blind-except flake8-debugger flake8-print flake8-quotes pep8-naming frosted isort coveralls -q | ||
- pip install virtualenv tox coveralls | ||
|
||
script: | ||
- python setup.py nosetests --with-coverage | ||
- tox | ||
|
||
after_success: | ||
- flake8 --show-source django_activeurl | ||
- frosted -r django_activeurl | ||
- isort --check-only -rc django_activeurl --dif | ||
- travis_retry coveralls | ||
- coveralls |
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
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
|
||
config = dict( | ||
ALLOWED_HOSTS=['testserver'], | ||
DEBUG=True, | ||
DATABASES={ | ||
'default': { | ||
|
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
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,87 +1,49 @@ | ||
# Tox (http://tox.testrun.org/) is a tool for running tests | ||
# in multiple virtualenvs. This configuration file will run the | ||
# test suite on all supported python versions. To use it, "pip install tox" | ||
# and then run "tox" from this directory. | ||
# Based off of django-extensions tox.ini, license MIT | ||
# https://github.com/django-extensions/django-extensions/blob/master/LICENSE | ||
|
||
[tox] | ||
envlist = | ||
py2-flake8, | ||
py2-frosted, | ||
py2-isort, | ||
py3-flake8, | ||
py3-frosted, | ||
py3-isort, | ||
py26-dj{13,14}, | ||
py27-dj{13,14,15,16,17,18,19}, | ||
py32-dj{15,16,17,18}, | ||
py33-dj{15,16,17,18}, | ||
py34-dj{15,16,17,18,19}, | ||
py35-dj{19}, | ||
py36-dj{19,110,110,111}, | ||
pypy-dj{13,14,15,16,17,18,19,110,111} | ||
isort | ||
{py27,py34,py35,py36}-flake8 | ||
{py27,py33,py34,py36,pypy,pypy3}-dj18 | ||
{py27,py34,py35,py36,pypy}-dj{dj110,dj111,master} | ||
|
||
[testenv] | ||
basepython = | ||
py2: python2 | ||
py3: python3 | ||
py26: python2.6 | ||
py27: python2.7 | ||
py32: python3.2 | ||
py33: python3.3 | ||
py34: python3.4 | ||
py35: python3.5 | ||
py36: python3.6 | ||
pypy: pypy | ||
commands = | ||
{envpython} setup.py nosetests | ||
deps = | ||
py32: jinja2<2.7 | ||
py{2,3,26,27,33,34,35,36,py}: jinja2 | ||
dj13: django>=1.3,<1.4 | ||
dj14: django>=1.4,<1.5 | ||
dj15: django>=1.5,<1.6 | ||
dj16: django>=1.6,<1.7 | ||
dj17: django>=1.7,<1.8 | ||
dj18: django>=1.8,<1.9 | ||
dj19: django>=1.9,<1.10 | ||
dj110: django>=1.10,<1.11 | ||
dj111: django>=1.11,<1.12 | ||
isort: isort | ||
nose | ||
commands = {envpython} setup.py test | ||
whitelist_externals = make | ||
|
||
[testenv:py2-flake8] | ||
deps = | ||
flake8 | ||
flake8-blind-except | ||
flake8-debugger | ||
flake8-print | ||
flake8-quotes | ||
pep8-naming | ||
commands = | ||
flake8 --show-source django_activeurl | ||
dj18: Django>=1.8,<1.9 | ||
dj110: Django>=1.10,<1.11 | ||
dj111: Django>=1.11b1,<1.12 | ||
djmaster: https://github.com/django/django/archive/master.tar.gz | ||
pytest==3.1.3 | ||
|
||
[testenv:py2-frosted] | ||
[testenv:py27-flake8] | ||
deps = | ||
frosted | ||
commands = | ||
frosted -r django_activeurl | ||
flake8 | ||
commands = flake8 django_activeurl tests | ||
|
||
[testenv:py2-isort] | ||
commands = | ||
isort --check-only -rc django_activeurl --diff | ||
[testenv:py34-flake8] | ||
deps = | ||
flake8 | ||
commands = flake8 django_activeurl tests | ||
|
||
[testenv:py3-flake8] | ||
[testenv:py35-flake8] | ||
deps = | ||
flake8 | ||
flake8-blind-except | ||
flake8-debugger | ||
flake8-print | ||
flake8-quotes | ||
pep8-naming | ||
commands = | ||
flake8 --show-source django_activeurl | ||
flake8 | ||
commands = flake8 django_activeurl tests | ||
|
||
[testenv:py3-frosted] | ||
[testenv:py27-isort] | ||
deps = | ||
frosted | ||
commands = | ||
frosted -r django_activeurl | ||
isort | ||
commands = isort --check-only -rc django_activeurl --diff | ||
|
||
[testenv:py3-isort] | ||
commands = | ||
isort --check-only -rc django_activeurl --diff | ||
[testenv:py36-isort] | ||
deps = | ||
isort | ||
commands = isort --check-only -rc django_activeurl --diff |