forked from cantools/cantools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
82 lines (67 loc) · 1.6 KB
/
tox.ini
File metadata and controls
82 lines (67 loc) · 1.6 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
[tox]
envlist = py
[testenv]
package = wheel
deps =
pytest==7.4.*
pytest-cov==4.1.*
coverage==7.3.*
parameterized==0.9.*
windows-curses; platform_system=="Windows" and platform_python_implementation=="CPython" and python_version<"3.14"
freezegun>=1.5.2,<1.6.0
extras =
plot
commands =
pytest {posargs} --cov=cantools --cov-config=tox.ini --cov-report=xml --cov-report=term
[testenv:gh]
passenv =
GITHUB_*
PY_COLORS
[testenv:codegen]
deps =
cmake
commands =
cmake -S tests/test_c_code -B tests/test_c_code/build
cmake --build tests/test_c_code/build --target run_tests
[testenv:cov]
deps =
{[testenv]deps}
pytest-reporter-html-dots
allowlist_externals =
rm
commands =
rm -rf htmlcov/
pytest --cov=cantools --cov-report=html --cov-branch --cov-fail-under=92 --template=html-dots/index.html --report=htmlpytest/report.html {posargs}
[testenv:mypy]
deps =
mypy
commands =
mypy src
[testenv:ruff]
deps =
ruff
commands =
ruff check src
[pytest]
testpaths = tests
addopts = -v --color=yes
[coverage:run]
relative_files = True
branch = False
[coverage:paths]
source =
src
*/site-packages
[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
# typing-related code
^\s*@(typing\.)?overload\b