bidict/tox.ini

54 lines
1.4 KiB
INI

[tox]
download = true
envlist =
py3{13,12,11,10,9}
pypy3.10
# Do not include the following so they only run when explicitly requested:
# benchmark
# coverage
# docs
# lint
skip_missing_interpreters = true
# https://hynek.me/articles/turbo-charge-tox/
package = wheel
wheel_build_env = .pkg
[testenv]
runner = uv-venv-lock-runner
passenv =
# https://docs.pytest.org/en/stable/example/simple.html
PYTEST_ADDOPTS
# https://docs.pytest.org/en/7.1.x/reference/reference.html#envvar-FORCE_COLOR
FORCE_COLOR
# 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
commands =
mypy bidict tests
pytest
[testenv:benchmark]
commands = pytest -n0 --benchmark-autosave tests/microbenchmarks.py
[testenv:coverage]
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
[testenv:docs]
extras = docs
commands = sphinx-build -TWn --keep-going -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
[testenv:lint]
deps =
skip_install = true
allowlist_externals = pre-commit
commands = pre-commit run --all-files --verbose --show-diff-on-failure