-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
tox.ini
79 lines (65 loc) · 1.8 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[tox]
min_version = 4
env_list =
lint,
mypy-{api,pkg},
docs,
py3{8,9,10,11,12,13}{,-pyopenssl}{,-oldest}{,-idna},
coverage-report
[testenv]
package = wheel
wheel_build_env = .pkg
extras =
tests
idna: idna
deps =
pyopenssl: pyopenssl
pass_env =
FORCE_COLOR
NO_COLOR
set_env =
oldest: PIP_CONSTRAINT = tests/constraints/oldest-cryptography.txt
pyopenssl-oldest: PIP_CONSTRAINT = tests/constraints/oldest-pyopenssl.txt
commands =
coverage run -m pytest {posargs}
py312-pyopenssl-latest-idna: coverage run -m pytest --doctest-modules --doctest-glob='*.rst' {posargs}
[testenv:coverage-report]
# keep in-sync with .python-version-default
base_python = py312
deps = coverage[toml]>=5.0.2
skip_install = true
commands =
coverage combine
coverage report
[testenv:lint]
skip_install = true
deps = pre-commit-uv
commands = pre-commit run --all-files {posargs}
[testenv:mypy-api]
extras = mypy
commands = mypy tests/typing docs/pyopenssl_example.py
[testenv:mypy-pkg]
extras = mypy
commands = mypy src
[testenv:docs]
# Keep in-sync with gh-actions and .readthedocs.yaml.
base_python = py312
extras = docs
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
[testenv:docs-watch]
package = editable
base_python = {[testenv:docs]base_python}
extras = {[testenv:docs]extras}
deps = watchfiles
commands =
watchfiles \
--ignore-paths docs/_build/ \
'sphinx-build -W -n --jobs auto -b html -d {envtmpdir}/doctrees docs docs/_build/html' \
src \
docs
[testenv:docs-linkcheck]
base_python = {[testenv:docs]base_python}
extras = {[testenv:docs]extras}
commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/html