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

Commit

Permalink
Merge pull request #53 from ymyzk/enhancement/testing
Browse files Browse the repository at this point in the history
Improve testing with tox
  • Loading branch information
ymyzk authored Mar 31, 2017
2 parents bd6263d + 04e5927 commit cbb569a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
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

0 comments on commit cbb569a

Please sign in to comment.