-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtox.ini
80 lines (73 loc) · 1.65 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
[tox]
skipsdist=True
skip_missing_interpreters = True
envlist = lint, unit, func
[testenv]
basepython = python3
setenv =
PYTHONPATH = {toxinidir}/reactive:{toxinidir}/lib/:{toxinidir}/tests:{toxinidir}/actions:{toxinidir}
passenv =
HOME
PATH
CHARM_*
PYTEST_KEEP_MODEL
PYTEST_CLOUD_NAME
PYTEST_CLOUD_REGION
PYTEST_MODEL
MODEL_SETTINGS
HTTP_PROXY
HTTPS_PROXY
NO_PROXY
SNAP_HTTP_PROXY
SNAP_HTTPS_PROXY
OS_*
TEST_*
[testenv:lint]
commands =
flake8
black --check --exclude "/(\.eggs|\.git|\.tox|\.venv|\.build|dist|charmhelpers|mod)/" .
deps =
black
flake8
flake8-docstrings
flake8-import-order
pep8-naming
flake8-colors
[flake8]
exclude =
.git,
__pycache__,
.tox,
charmhelpers,
mod,
.build
max-line-length = 88
max-complexity = 10
# multiple lines because of https://bugs.launchpad.net/charm-duplicity/+bug/1998094
ignore =
#TODO remove it.
E402
# for asses_status() in reactive/duplicity.py
C901
[testenv:black]
commands =
black --exclude "/(\.eggs|\.git|\.tox|\.venv|\.build|dist|charmhelpers|mod)/" .
deps =
black
[testenv:unit]
commands =
pytest -v --ignore {toxinidir}/tests/functional \
--cov=lib \
--cov=reactive \
--cov=actions \
--cov=hooks \
--cov-report=term \
--cov-report=annotate:report/annotated \
--cov-report=html:report/html
deps = -r{toxinidir}/tests/unit/requirements.txt
-r{toxinidir}/requirements.txt
[testenv:func]
changedir = {toxinidir}/tests/functional
commands = functest-run-suite {posargs:--keep-faulty-model}
deps =
-r {toxinidir}/tests/functional/requirements.txt