2015-01-27 16:53:17 +00:00
|
|
|
[tox]
|
2019-01-17 08:34:29 +00:00
|
|
|
envlist = typing,lint,py27,py34,py35,py36,py37,pypy,pypy3,manifest,docs,doctest,pypi-description,changelog,coverage-report
|
2019-02-09 17:36:30 +00:00
|
|
|
isolated_build = True
|
2015-12-08 14:47:03 +00:00
|
|
|
|
2015-01-27 16:53:17 +00:00
|
|
|
|
|
|
|
[testenv]
|
2017-06-01 07:20:30 +00:00
|
|
|
# Prevent random setuptools/pip breakages like
|
|
|
|
# https://github.com/pypa/setuptools/issues/1042 from breaking our builds.
|
|
|
|
setenv =
|
|
|
|
VIRTUALENV_NO_DOWNLOAD=1
|
2018-01-04 08:29:57 +00:00
|
|
|
extras = tests
|
2016-09-12 05:54:22 +00:00
|
|
|
commands = python -m pytest {posargs}
|
|
|
|
|
|
|
|
|
|
|
|
[testenv:py27]
|
2018-01-04 08:29:57 +00:00
|
|
|
extras = tests
|
2015-12-08 14:47:03 +00:00
|
|
|
commands = coverage run --parallel -m pytest {posargs}
|
2016-09-05 12:50:08 +00:00
|
|
|
|
|
|
|
|
2018-07-05 05:39:16 +00:00
|
|
|
[testenv:py37]
|
2018-04-28 21:42:00 +00:00
|
|
|
# Python 3.6+ has a number of compile-time warnings on invalid string escapes.
|
|
|
|
# PYTHONWARNINGS=d and --no-compile below make them visible during the Tox run.
|
|
|
|
install_command = pip install --no-compile {opts} {packages}
|
|
|
|
setenv =
|
|
|
|
PYTHONWARNINGS=d
|
2018-01-04 08:29:57 +00:00
|
|
|
extras = tests
|
2016-09-12 05:54:22 +00:00
|
|
|
commands = coverage run --parallel -m pytest {posargs}
|
2016-09-05 12:50:08 +00:00
|
|
|
|
2015-01-27 16:53:17 +00:00
|
|
|
|
2017-11-26 21:18:07 +00:00
|
|
|
[testenv:coverage-report]
|
2018-11-24 12:17:26 +00:00
|
|
|
basepython = python3.7
|
2017-11-26 21:18:07 +00:00
|
|
|
skip_install = true
|
2018-11-24 12:17:26 +00:00
|
|
|
deps = coverage
|
2017-11-26 21:18:07 +00:00
|
|
|
commands =
|
|
|
|
coverage combine
|
|
|
|
coverage report
|
|
|
|
|
|
|
|
|
2018-06-10 17:40:07 +00:00
|
|
|
[testenv:lint]
|
2018-11-24 12:17:26 +00:00
|
|
|
basepython = python3.7
|
2018-06-10 17:40:07 +00:00
|
|
|
skip_install = true
|
|
|
|
deps = pre-commit
|
|
|
|
passenv = HOMEPATH # needed on Windows
|
2019-01-17 08:34:29 +00:00
|
|
|
commands = pre-commit run --all-files
|
2017-11-26 21:18:07 +00:00
|
|
|
|
|
|
|
|
2015-01-27 21:41:24 +00:00
|
|
|
[testenv:docs]
|
2019-02-25 15:28:53 +00:00
|
|
|
# RTD only allows for 3.7
|
|
|
|
basepython = python3.7
|
2019-01-17 08:34:29 +00:00
|
|
|
extras = docs
|
|
|
|
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
|
|
|
|
|
|
|
|
|
|
|
|
[testenv:doctest]
|
|
|
|
# We need up to date Python versions for our doctests.
|
2018-11-24 12:17:26 +00:00
|
|
|
basepython = python3.7
|
2018-01-04 08:29:57 +00:00
|
|
|
extras = docs
|
2015-01-27 21:41:24 +00:00
|
|
|
commands =
|
2015-12-08 15:00:06 +00:00
|
|
|
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
|
2015-01-29 22:16:07 +00:00
|
|
|
python -m doctest README.rst
|
2015-01-27 16:53:17 +00:00
|
|
|
|
2015-02-20 08:44:50 +00:00
|
|
|
|
2015-01-27 16:53:17 +00:00
|
|
|
[testenv:manifest]
|
2018-11-24 12:17:26 +00:00
|
|
|
basepython = python3.7
|
2015-12-08 14:47:03 +00:00
|
|
|
deps = check-manifest
|
2015-12-08 15:00:06 +00:00
|
|
|
skip_install = true
|
2015-12-08 14:47:03 +00:00
|
|
|
commands = check-manifest
|
|
|
|
|
2015-10-16 13:09:28 +00:00
|
|
|
|
2018-11-26 16:30:27 +00:00
|
|
|
[testenv:pypi-description]
|
2018-11-24 12:17:26 +00:00
|
|
|
basepython = python3.7
|
2015-12-19 12:04:01 +00:00
|
|
|
skip_install = true
|
2018-11-26 16:30:27 +00:00
|
|
|
deps =
|
|
|
|
twine
|
|
|
|
pip >= 18.0.0
|
|
|
|
commands =
|
|
|
|
pip wheel -w {envtmpdir}/build --no-deps .
|
|
|
|
twine check {envtmpdir}/build/*
|
2015-12-19 12:04:01 +00:00
|
|
|
|
2017-11-26 21:18:07 +00:00
|
|
|
|
2017-08-20 05:58:08 +00:00
|
|
|
[testenv:changelog]
|
2018-11-24 12:17:26 +00:00
|
|
|
basepython = python3.7
|
2017-08-20 05:58:08 +00:00
|
|
|
deps = towncrier
|
|
|
|
skip_install = true
|
|
|
|
commands = towncrier --draft
|
2018-07-12 10:19:24 +00:00
|
|
|
|
2018-11-26 11:58:39 +00:00
|
|
|
|
2018-07-12 10:19:24 +00:00
|
|
|
[testenv:typing]
|
2018-11-24 12:17:26 +00:00
|
|
|
basepython = python3.7
|
2018-07-12 10:19:24 +00:00
|
|
|
deps = mypy
|
|
|
|
commands = mypy tests/typing_example.py
|