-
Notifications
You must be signed in to change notification settings - Fork 773
/
tox.ini
56 lines (48 loc) · 1.32 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
[tox]
skipsdist=True
skip_missing_interpreters = True
envlist = lint, scripts, wrappers
[testenv]
basepython = python3
envdir = {toxinidir}/.tox_env
passenv =
MK8S_*
deps =
black ==21.4b2
click==7.1.2
flake8
flake8-colors
pep8-naming
codespell
-r{toxinidir}/tests/requirements.txt
[testenv:lint]
commands =
flake8 --max-line-length=120 --ignore=C901,N801,N802,N803,N806,N816,W503,E203
codespell --ignore-words-list="aks,ccompiler" --quiet-level=2 --skip="*.patch,*.spec,.tox_env,.git,*.nsi"
black --diff --check --exclude "/(\.eggs|\.git|\.tox|\.venv|\.build|dist|charmhelpers|mod)/" .
[testenv:scripts]
setenv = PYTHONPATH={toxinidir}/scripts
commands =
pytest -s tests/unit/test_upgrade_calico_cni.py {posargs}
[testenv:wrappers]
setenv = PYTHONPATH={toxinidir}/scripts/wrappers
commands =
pytest -s tests/unit/ \
--ignore=tests/unit/test_upgrade_calico_cni.py \
--ignore-glob=tests/unit/cluster/* {posargs}
[testenv:cluster]
setenv = PYTHONPATH={toxinidir}/scripts/wrappers
commands =
pytest -s tests/unit/cluster {posargs}
[testenv:clustering]
commands = pytest -s tests/test-cluster.py
[testenv:simple]
commands = pytest -rA -s tests/test-simple.py
[flake8]
exclude =
.git,
__pycache__,
.tox,
.tox_env,
max-complexity = 10
import-order-style = google