-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
50 lines (44 loc) · 1.1 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
[tox]
# env_list = py{3.11,3.12}
env_list = py
minversion = 4.14.2
isolated_build = True
[testenv]
description = run tests with coverage
package = wheel
wheel_build_env = .pkg
deps =
pytest>=6
pylint>=3.1.0
coverage>=7.4.4
commands =
coverage erase
coverage run -m pytest --color=auto
coverage report -m
coverage html
coverage json -o htmlcov/coverage.json
python -c 'from sys import version_info; from shutil import rmtree; from os import rename; rename(".coverage", f"htmlcov/.coverage"); rmtree(f"htmlcov-py{version_info.major}.{version_info.minor}", ignore_errors=True); rename("htmlcov", f"htmlcov-py{version_info.major}.{version_info.minor}")'
[testenv:lint]
description = run linters
deps =
pytest>=6
pylint>=3.1.0
commands =
pylint --reports=y src/ tests/
[testenv:fmt]
description = run formatters
deps =
pytest>=6
black>=24.4.0
commands =
black src/ tests/ examples/
[testenv:build]
description = run build
deps =
build>=1.2.1
commands =
python -m build
[coverage:run]
dynamic_context = test_function
[coverage:html]
show_contexts = True