2014-09-23 14:08:21 +00:00
|
|
|
[tox]
|
2020-12-20 15:40:40 +00:00
|
|
|
envlist =
|
2023-07-03 14:18:26 +00:00
|
|
|
# Use "python3.X" rather than "py3X" so env names match python executable names
|
|
|
|
python3.{12,11,10,9,8}
|
2023-10-01 19:01:48 +00:00
|
|
|
pypy3.{10,9}
|
2024-01-14 03:06:15 +00:00
|
|
|
benchmark
|
2021-03-24 22:11:28 +00:00
|
|
|
lint
|
2020-12-20 15:40:40 +00:00
|
|
|
docs
|
2024-01-14 03:06:15 +00:00
|
|
|
# do not include 'coverage' so it only runs when explicitly requested
|
2020-12-20 15:40:40 +00:00
|
|
|
|
|
|
|
skip_missing_interpreters = true
|
2014-09-23 14:08:21 +00:00
|
|
|
|
2024-02-20 22:56:44 +00:00
|
|
|
# Keep in sync with ./dev-deps/dev.env:
|
2023-12-30 17:06:05 +00:00
|
|
|
_default_py_minor_ver = 12
|
|
|
|
_default_req_dir = dev-deps/python3.{[tox]_default_py_minor_ver}
|
|
|
|
|
2014-09-23 14:08:21 +00:00
|
|
|
[testenv]
|
2023-07-03 14:18:26 +00:00
|
|
|
deps = -r dev-deps/{envname}/test.txt
|
|
|
|
# https://hynek.me/articles/turbo-charge-tox/
|
|
|
|
package = wheel
|
|
|
|
wheel_build_env = .pkg
|
2022-12-24 14:52:35 +00:00
|
|
|
passenv =
|
2023-12-30 17:06:05 +00:00
|
|
|
# https://docs.pytest.org/en/stable/example/simple.html
|
2022-12-24 14:52:35 +00:00
|
|
|
PYTEST_ADDOPTS
|
2022-12-27 01:13:48 +00:00
|
|
|
# https://docs.pytest.org/en/7.1.x/reference/reference.html#envvar-FORCE_COLOR
|
2022-12-24 14:52:35 +00:00
|
|
|
FORCE_COLOR
|
2022-12-27 01:13:48 +00:00
|
|
|
# https://hypothesis.readthedocs.io/en/latest/settings.html#hypothesis.settings.print_blob
|
|
|
|
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
|
|
|
|
CI
|
2024-02-18 14:29:34 +00:00
|
|
|
commands =
|
|
|
|
mypy bidict tests
|
|
|
|
pytest
|
2020-12-20 15:40:40 +00:00
|
|
|
|
2023-09-10 17:37:42 +00:00
|
|
|
[testenv:python3.12]
|
|
|
|
base_python = py312
|
|
|
|
|
|
|
|
[testenv:python3.11]
|
|
|
|
base_python = py311
|
|
|
|
|
|
|
|
[testenv:python3.10]
|
|
|
|
base_python = py310
|
|
|
|
|
|
|
|
[testenv:python3.9]
|
|
|
|
base_python = py39
|
|
|
|
|
|
|
|
[testenv:python3.8]
|
|
|
|
base_python = py38
|
|
|
|
|
2024-01-14 03:06:15 +00:00
|
|
|
[testenv:benchmark]
|
|
|
|
base_python = py3{[tox]_default_py_minor_ver}
|
|
|
|
deps = -r {[tox]_default_req_dir}/test.txt
|
|
|
|
commands = pytest -n0 --benchmark-autosave tests/microbenchmarks.py
|
|
|
|
|
2021-03-24 22:11:28 +00:00
|
|
|
[testenv:lint]
|
2024-01-09 18:59:27 +00:00
|
|
|
base_python = py3{[tox]_default_py_minor_ver}
|
2023-12-30 17:06:05 +00:00
|
|
|
deps = pre-commit
|
2020-12-20 15:40:40 +00:00
|
|
|
skip_install = true
|
2022-11-02 23:14:42 +00:00
|
|
|
commands = pre-commit run --all-files --verbose --show-diff-on-failure
|
2020-12-20 15:40:40 +00:00
|
|
|
|
|
|
|
[testenv:docs]
|
2024-01-09 18:59:27 +00:00
|
|
|
base_python = py3{[tox]_default_py_minor_ver}
|
2023-12-30 17:06:05 +00:00
|
|
|
deps = -r {[tox]_default_req_dir}/docs.txt
|
2024-02-12 01:43:28 +00:00
|
|
|
commands = sphinx-build -Wn --keep-going -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
|
2023-12-30 17:06:05 +00:00
|
|
|
|
|
|
|
[testenv:coverage]
|
2024-01-09 18:59:27 +00:00
|
|
|
base_python = py3{[tox]_default_py_minor_ver}
|
2023-12-30 17:06:05 +00:00
|
|
|
deps = -r {[tox]_default_req_dir}/test.txt
|
|
|
|
setenv =
|
|
|
|
# https://coverage.readthedocs.io/en/7.4.0/changes.html#version-7-4-0-2023-12-27
|
|
|
|
COVERAGE_CORE=sysmon
|
|
|
|
# https://hynek.me/articles/turbo-charge-tox/#coverage-enable-subprocess
|
|
|
|
COVERAGE_PROCESS_START={toxinidir}/.coveragerc
|
|
|
|
commands =
|
|
|
|
coverage run -m pytest
|
|
|
|
coverage combine
|
|
|
|
coverage report
|