Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Improve testing with tox #53

Merged
merged 2 commits into from
Mar 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,16 @@ def get_version():
'sphinx-rtd-theme>=0.2,<0.3'
],
'test': [
'coverage>=4.3.4,<5.0.0',
'coveralls>=1.1,<2.0',
'flake8>=3.3.0,<4.0.0',
'pytest>=3.0.0,<4.0.0',
'pytest-cov>=2.4.0,<3.0.0',
'pytest-mock>=1.5.0,<2.0.0',
],
'test:python_version >= "3.3"': [
'mypy-lang>=0.4.6,<0.5.0',
],
}

classifiers = [
Expand Down
33 changes: 19 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
[tox]
envlist = {py27,py33,py34,pypy,pypy3}-django18, {py27,py34,py35,pypy}-django{19,110}, {py27,py34,py35,py36}-django111, coverage, docs, flake8, mypy
; https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
envlist =
py27, py33, py34, py35, py36,
; https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
py27-django{18,19,110,111},
py33-django18,
py34-django{19,110,111},
py35-django{19,110,111},
py36-django111,
coverage, docs, flake8, mypy

[travis]
python =
2.7: py27-django{18,19,110,111}, coverage, docs, flake8
3.3: py33-django18
3.4: py34-django{19,110,111}
3.5: py35-django{19,110,111}, coverage, docs, flake8, mypy
3.6: py36-django111
2.7: py27, py27-django{18,19,110,111}, coverage, docs, flake8
3.3: py33, py33-django18
3.4: py34, py34-django{19,110,111}
3.5: py35, py35-django{19,110,111}, coverage, docs, flake8, mypy
3.6: py36, py36-django111

[testenv]
deps =
Expand All @@ -19,14 +26,11 @@ deps =
commands =
pip install -e .[test]
pytest tests/core
python tests/django/runtests.py
django{18,19,110,111}: python tests/django/runtests.py
passenv = CHANNELS_* TRAVIS TRAVIS_BRANCH TRAVIS_JOB_ID

[testenv:coverage]
deps =
coveralls
coverage
pytest-cov
Django>=1.10,<1.11
commands =
pip install -e .[test]
Expand All @@ -43,11 +47,12 @@ commands =
make html

[testenv:flake8]
deps = flake8
commands = flake8 kawasemi/
commands =
pip install -e .[test]
flake8 kawasemi/

[testenv:mypy]
deps = mypy-lang
commands =
pip install -e .[test]
mypy --py2 --silent-imports -m kawasemi
mypy --silent-imports -m kawasemi