2012-09-08 16:18:25 +02:00
|
|
|
[tox]
|
2018-10-24 20:14:14 +02:00
|
|
|
minversion = 3.4.0
|
2015-05-27 19:32:39 +02:00
|
|
|
envlist =
|
2017-06-14 08:08:11 +02:00
|
|
|
docs, packaging, lint-py2, lint-py3, mypy,
|
2018-07-02 21:22:16 +02:00
|
|
|
py27, py34, py35, py36, py37, py38, pypy, pypy3
|
2012-09-08 16:18:25 +02:00
|
|
|
|
2018-10-01 05:22:08 +02:00
|
|
|
[helpers]
|
|
|
|
# Wrapper for calls to pip that make sure the version being used is the
|
|
|
|
# original virtualenv (stable) version, and not the code being tested.
|
|
|
|
pip = python {toxinidir}/tools/tox_pip.py
|
|
|
|
|
2012-09-08 16:18:25 +02:00
|
|
|
[testenv]
|
2018-12-08 04:47:53 +01:00
|
|
|
passenv = CI GIT_SSL_CAINFO
|
2015-05-14 12:59:33 +02:00
|
|
|
setenv =
|
|
|
|
# This is required in order to get UTF-8 output inside of the subprocesses
|
|
|
|
# that our tests use.
|
|
|
|
LC_CTYPE = en_US.UTF-8
|
2018-06-15 18:27:10 +02:00
|
|
|
deps = -r{toxinidir}/tools/tests-requirements.txt
|
2018-10-08 18:09:53 +02:00
|
|
|
commands_pre =
|
|
|
|
python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' {toxinidir}/tests/data/common_wheels
|
|
|
|
{[helpers]pip} wheel -w {toxinidir}/tests/data/common_wheels -r {toxinidir}/tools/tests-common_wheels-requirements.txt
|
2018-05-26 13:16:12 +02:00
|
|
|
commands = pytest --timeout 300 []
|
2018-10-01 05:22:08 +02:00
|
|
|
install_command = {[helpers]pip} install {opts} {packages}
|
|
|
|
list_dependencies_command = {[helpers]pip} freeze --all
|
2014-04-26 06:32:27 +02:00
|
|
|
|
2017-11-14 07:33:01 +01:00
|
|
|
[testenv:coverage-py3]
|
|
|
|
basepython = python3
|
2018-05-26 13:16:12 +02:00
|
|
|
commands = pytest --timeout 300 --cov=pip --cov-report=term-missing --cov-report=xml --cov-report=html tests/unit {posargs}
|
2017-11-14 07:33:01 +01:00
|
|
|
|
2013-08-28 12:31:39 +02:00
|
|
|
[testenv:docs]
|
2018-08-21 20:37:42 +02:00
|
|
|
# Don't skip install here since pip_sphinxext uses pip's internals.
|
2018-06-15 18:27:10 +02:00
|
|
|
deps = -r{toxinidir}/tools/docs-requirements.txt
|
2019-05-08 17:26:34 +02:00
|
|
|
basepython = python3.6
|
2017-07-06 01:56:13 +02:00
|
|
|
commands =
|
2018-08-22 08:03:19 +02:00
|
|
|
sphinx-build -W -d {envtmpdir}/doctrees/html -b html docs/html docs/build/html
|
|
|
|
# Having the conf.py in the docs/html is weird but needed because we
|
|
|
|
# can not use a different configuration directory vs source directory on RTD
|
|
|
|
# currently -- https://github.com/rtfd/readthedocs.org/issues/1543.
|
|
|
|
# That is why we have a "-c docs/html" in the next line.
|
|
|
|
sphinx-build -W -d {envtmpdir}/doctrees/man -b man docs/man docs/build/man -c docs/html
|
2014-01-27 14:29:29 +01:00
|
|
|
|
2014-09-29 17:07:24 +02:00
|
|
|
[testenv:packaging]
|
2018-08-13 07:26:54 +02:00
|
|
|
skip_install = True
|
2015-10-01 15:13:16 +02:00
|
|
|
deps =
|
2015-09-28 02:28:36 +02:00
|
|
|
check-manifest
|
2016-01-04 23:30:54 +01:00
|
|
|
readme_renderer
|
2018-10-08 18:09:53 +02:00
|
|
|
commands_pre =
|
2015-10-01 15:13:16 +02:00
|
|
|
commands =
|
2015-09-28 02:28:36 +02:00
|
|
|
check-manifest
|
|
|
|
python setup.py check -m -r -s
|
2014-09-29 17:07:24 +02:00
|
|
|
|
2017-07-06 01:51:42 +02:00
|
|
|
[lint]
|
2018-06-15 20:38:33 +02:00
|
|
|
deps = -r{toxinidir}/tools/lint-requirements.txt
|
2017-07-06 01:51:42 +02:00
|
|
|
commands =
|
2018-06-25 13:30:40 +02:00
|
|
|
flake8
|
|
|
|
isort --check-only --diff
|
2014-01-27 20:40:32 +01:00
|
|
|
|
2017-07-06 01:51:42 +02:00
|
|
|
[testenv:lint-py2]
|
2018-08-13 07:26:54 +02:00
|
|
|
skip_install = True
|
2017-07-06 01:51:42 +02:00
|
|
|
basepython = python2
|
|
|
|
deps = {[lint]deps}
|
2018-10-08 18:09:53 +02:00
|
|
|
commands_pre =
|
2017-07-06 01:51:42 +02:00
|
|
|
commands = {[lint]commands}
|
2014-01-27 20:40:32 +01:00
|
|
|
|
2017-07-06 01:51:42 +02:00
|
|
|
[testenv:lint-py3]
|
2018-08-13 07:26:54 +02:00
|
|
|
skip_install = True
|
2017-05-15 10:55:44 +02:00
|
|
|
basepython = python3
|
2017-07-06 01:51:42 +02:00
|
|
|
deps = {[lint]deps}
|
2018-10-08 18:09:53 +02:00
|
|
|
commands_pre =
|
2017-07-06 01:51:42 +02:00
|
|
|
commands = {[lint]commands}
|
2017-07-17 19:32:30 +02:00
|
|
|
|
|
|
|
[testenv:mypy]
|
2018-08-13 07:26:54 +02:00
|
|
|
skip_install = True
|
2017-07-17 19:32:30 +02:00
|
|
|
basepython = python3
|
2018-09-18 09:29:49 +02:00
|
|
|
deps = -r{toxinidir}/tools/mypy-requirements.txt
|
2018-10-08 18:09:53 +02:00
|
|
|
commands_pre =
|
2017-07-17 19:32:30 +02:00
|
|
|
commands =
|
2018-06-14 13:18:53 +02:00
|
|
|
mypy src
|
|
|
|
mypy src -2
|