[tox] envlist = # Use "python3.X" rather than "py3X" so env names match python executable names python3.{12,11,10,9,8} pypy3.{10,9} benchmark lint docs # do not include 'coverage' so it only runs when explicitly requested skip_missing_interpreters = true # Keep in sync with ./dev-deps/dev.env: _default_py_minor_ver = 12 _default_req_dir = dev-deps/python3.{[tox]_default_py_minor_ver} [testenv] deps = -r dev-deps/{envname}/test.txt # https://hynek.me/articles/turbo-charge-tox/ package = wheel wheel_build_env = .pkg 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: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 [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 [testenv:lint] base_python = py3{[tox]_default_py_minor_ver} deps = pre-commit skip_install = true commands = pre-commit run --all-files --verbose --show-diff-on-failure [testenv:docs] base_python = py3{[tox]_default_py_minor_ver} deps = -r {[tox]_default_req_dir}/docs.txt commands = sphinx-build -Wn --keep-going -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html [testenv:coverage] base_python = py3{[tox]_default_py_minor_ver} 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