1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
[tox]
minversion = 4.4.4
skip_missing_interpreters = {env:TOX_SKIP_MISSING_INTERPRETERS:True}
envlist =
py38,
py39,
py310,
py311,
py312,
py313,
py314,
docs,
lint,
type,
isolated_build = true
[testenv]
description = run the test driver with {basepython}
passenv =
PROGRAMDATA
PROGRAMFILES(X86)
PYTEST_ADDOPTS
PYTEST_XDIST_WORKER_COUNT
PYTHON_COLORS
deps =
-r test-requirements.txt
# This is a bit of a hack, but ensures the faster-cache path is tested in CI
orjson;python_version=='3.12'
commands = python -m pytest {posargs}
[testenv:dev]
description = generate a DEV environment, that has all project libraries
usedevelop = True
deps =
-r test-requirements.txt
-r docs/requirements-docs.txt
commands =
python -m pip list --format=columns
python -c 'import sys; print(sys.executable)'
{posargs}
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
passenv =
VERIFY_MYPY_ERROR_CODES
deps = -r docs/requirements-docs.txt
commands =
sphinx-build -n -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out" --color -W -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
[testenv:lint]
description = check the code style
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:type]
description = type check ourselves
passenv =
TERM
MYPY_FORCE_COLOR
MYPY_FORCE_TERMINAL_WIDTH
commands =
python runtests.py self
python -m mypy --config-file mypy_self_check.ini misc --exclude misc/sync-typeshed.py
python -m mypy --config-file mypy_self_check.ini test-data/unit/plugins
|