-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
87 lines (79 loc) · 2.02 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
86
87
[tox]
envlist = lint,codespell,flake8,black,build-doc,{py37,py38,py39,py310,py311}-{test}
skip_missing_interpreters = true
isolated_build = true
[testenv]
setenv =
package = pylibschc
deps =
build-doc: {[testenv:build-doc]deps}
test: {[testenv:test]deps}
codespell: {[testenv:codespell]deps}
lint: {[testenv:lint]deps}
flake8: {[testenv:flake8]deps}
black: {[testenv:black]deps}
valgrind: {[testenv:valgrind]deps}
commands =
build-doc: {[testenv:build-doc]commands}
test: {[testenv:test]commands}
codespell: {[testenv:codespell]commands}
lint: {[testenv:lint]commands}
flake8: {[testenv:flake8]commands}
black: {[testenv:black]commands}
valgrind: {[testenv:valgrind]commands}
[testenv:build-doc]
setenv =
CYTHON_EMBEDSIGNATURE = 1
deps =
sphinx
sphinx-c-autodoc
clang<16
.
commands =
sphinx-build -M html docs docs/_build -W
[testenv:test]
deps =
pytest
pytest-asyncio
pytest-cov
pytest-subtests
scapy
.
commands =
pytest --cov={envsitepackagesdir}/pylibschc {posargs}
[testenv:codespell]
deps =
codespell
commands =
codespell
[testenv:lint]
deps =
pylint
pytest
scapy
.
commands =
pylint --rcfile=setup.cfg {env:package} tests
[testenv:flake8]
deps =
flake8
cython-lint
.
commands =
flake8
cython-lint --max-line-length 88 {env:package}/libschc.pyx
[testenv:black]
deps =
black
.
commands =
black --check --diff --exclude '\.eggs|\.tox|dist|env|build' .
[testenv:valgrind]
deps = {[testenv:test]deps}
allowlist_externals = valgrind
# exclude README.rst doctests; the rules in there are fair game to not being free'd
commands =
valgrind --suppressions={toxinidir}/valgrind-python.supp --leak-check=full \
--show-leak-kinds=definite --show-error-list=yes --track-origins=yes \
{envbindir}/python {envbindir}/pytest --cov={envsitepackagesdir}/pylibschc \
-s --log-cli-level=DEBUG -k "not README.rst" {posargs}