-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
85 lines (75 loc) · 1.5 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
80
81
82
83
84
85
[tox]
requires =
tox>=4.4
env_list =
py39
py310
py311
py312
skip_missing_interpreters = true
[testenv]
package = wheel
wheel_build_env = .pkg
[testenv:py3{9,10,11,12}]
pass_env =
PYTEST_*
set_env =
COVERAGE_FILE = {envdir}{/}.coverage
HYPOTHESIS_STORAGE_DIRECTORY = {envdir}{/}.cache{/}hypothesis
extras =
test
commands =
coverage erase
pytest -v -o cache_dir={envdir}{/}.cache{/}pytest \
--cov-report=html:{envdir}{/}htmlcov {posargs}
coverage report
[testenv:lint]
extras =
lint
commands =
ruff check --cache-dir={envdir}{/}.cache{/}ruff {toxinidir}
ruff format --cache-dir={envdir}{/}.cache{/}ruff {toxinidir}
mypy --cache-dir={envdir}{/}.cache{/}mypy {toxinidir}
[testenv:docs]
extras =
docs
commands =
python {toxinidir}{/}docs{/}release.py --clean --dist {posargs}
[testenv:dev]
extras =
docs
lint
test
package = editable
system_site_packages = true
[pytest]
addopts = --strict-markers --cov --cov-context=test
cache_dir = .cache/pytest
filterwarnings =
error
ignore::DeprecationWarning
testpaths =
tests
xfail_strict = true
[coverage:run]
branch = true
relative_files = true
source =
gethash
tests
[coverage:paths]
source =
src
*/site-packages
[coverage:report]
exclude_also =
assert_never\(.*\)
raise AssertionError
raise NotImplementedError
return NotImplemented
if __name__ == .__main__.:
if TYPE_CHECKING:
@overload
precision = 1
[coverage:html]
show_contexts = true