-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
55 lines (46 loc) · 1.31 KB
/
tox.ini
File metadata and controls
55 lines (46 loc) · 1.31 KB
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
;
; tox - automated and standardized testing in Python
; <https://tox.wiki/en/latest/user_guide.html>
;
; requires a uv-enabled tox environment:
;
; `uv tool install tox --with tox-uv`
;
[tox]
requires =
tox >=4
env_list =
lint
type
py{310,311,312}
; pytest & coverage
; https://pytest-cov.readthedocs.io/en/latest/tox.html
[coverage:run]
branch = True
[coverage:report]
fail_under = 90
[coverage:html]
directory = tests/coverage_report/
; https://github.com/PyCQA/flake8
[flake8]
max-line-length = 250
extend-ignore = E221,E241
[testenv:lint]
description = lint code (flake8)
commands =
uv run --active flake8 {posargs:feeph examples/ tests/}
[testenv:type]
description = check type hints
commands =
uv run --active mypy -p feeph.i2c
uv run --active mypy {posargs:examples/ tests/}
; code is incompatible with Python 3.9 due to type hints
; (it could be fixed by changing the type hints but we won't)
[testenv]
description = perform compatibility tests using pytest
# do not generate a coverage report from tox
# if we would the files would be relative to the tox virtual environments
# and prefixed with '.tox/py*/lib/python*/site-packages/' - which makes
# them interesting to look at but useless for consumption by other tools
commands =
uv run --active pytest --no-cov {posargs: tests/}