forked from hardbyte/python-can
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
98 lines (87 loc) · 1.91 KB
/
tox.ini
File metadata and controls
98 lines (87 loc) · 1.91 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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
# https://tox.wiki/en/latest/config.html
[tox]
min_version = 4.26
env_list = py,lint,type,docs
[testenv]
passenv =
CI
GITHUB_*
COVERALLS_*
PY_COLORS
TEST_SOCKETCAN
dependency_groups =
test
extras =
canalystii
mf4
multicast
pywin32
serial
viewer
commands =
pytest {posargs}
[testenv:py314]
extras =
canalystii
serial
pywin32
[testenv:{py313t,py314t,pypy310,pypy311}]
extras =
canalystii
serial
[testenv:docs]
description = Build and test the documentation
basepython = py313
dependency_groups =
docs
extras =
canalystii
gs-usb
commands =
python -m sphinx -b html -Wan --keep-going doc build
python -m sphinx -b doctest -W --keep-going doc build
[testenv:lint]
description = Run linters
basepython = py313
dependency_groups =
lint
extras =
viewer
commands =
black --check .
ruff check can examples doc
pylint \
can/**.py \
can/io \
doc/conf.py \
examples/**.py \
can/interfaces/socketcan
[testenv:type]
description = Run type checker
basepython = py313
dependency_groups =
lint
extras =
commands =
mypy --python-version 3.10 .
mypy --python-version 3.11 .
mypy --python-version 3.12 .
mypy --python-version 3.13 .
mypy --python-version 3.14 .
[pytest]
testpaths = test
addopts = -v --timeout=300 --cov=can --cov-config=tox.ini --cov-report=lcov --cov-report=term --color=yes
[coverage:run]
# we could also use branch coverage
branch = False
[coverage:report]
# two digits after decimal point
precision = 3
show_missing = True
exclude_lines =
# Have to re-enable the standard pragma, see https://coverage.readthedocs.io/en/coverage-4.5.1a/config.html#syntax
pragma: no cover
# Don't complain if non-runnable code isn't run:
if __name__ == .__main__.:
# Don't complain if tests don't hit defensive assertion code:
raise NotImplementedError