-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
tox.ini
53 lines (47 loc) · 1.43 KB
/
tox.ini
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
[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