-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
78 lines (72 loc) · 1.77 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
[tox]
skipsdist=True
envlist = lint, test-flake8{5,6}, coverage-report
[vars]
src_module = {toxinidir}/flake8_mock_spec
src_path = {[vars]src_module}.py
tst_path = {toxinidir}/tests/
all_path = {[vars]src_path} {[vars]tst_path}
[testenv]
allowlist_externals=python,poetry
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/lib:{[vars]src_path}
PYTHONBREAKPOINT=ipdb.set_trace
PY_COLORS=1
passenv =
PYTHONPATH
[testenv:fmt]
description = Apply coding style standards to code
deps =
isort>=5,<6
black>=22
commands =
isort {[vars]all_path}
black {[vars]all_path}
[testenv:lint]
description = Check code against coding style standards
deps =
mypy>=0,<1
isort>=5,<6
black>=22
flake8-docstrings>=1,<2
flake8-builtins>=2,<3
flake8-test-docs>=1,<2
flake8-docstrings-complete>=1,<2
pep8-naming>=0,<1
codespell>=2,<3
pylint>=2,<3
pydocstyle>=6,<7
pytest>=7,<8
hypothesis>=6,<7
commands =
pydocstyle {[vars]src_path}
codespell {toxinidir} --skip {toxinidir}/.git --skip {toxinidir}/.tox \
--skip {toxinidir}/.venv --skip {toxinidir}/.mypy_cache
flake8 {[vars]all_path}
isort --check-only --diff {[vars]all_path}
black --check --diff {[vars]all_path}
mypy {[vars]all_path}
pylint {[vars]all_path}
pydocstyle {[vars]src_path}
[testenv:test-flake8{5,6}]
description = Run tests
deps =
flake85: flake8>=5,<6
flake86: flake8>=6,<7
pytest>=7,<8
pytest-cov>=4,<5
astpretty>=3,<4
coverage[toml]>=6,<7
poetry
commands =
poetry install --only-root
flake8 --version
coverage run \
-m pytest -v --tb native -s {posargs}
coverage report
[testenv:coverage-report]
description = Create test coverage report
deps =
coverage[toml]>=6,<7
commands =
coverage report