-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
80 lines (68 loc) · 1.51 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
[flake8]
max-line-length = 88
# ignore E501: let black handle line lengths, sometimes it will go over 88
extend-ignore = E501
[tox]
skipsdist=True
skip_missing_interpreters = True
envlist = lint, unit
[vars]
src_path = {toxinidir}/src/
tst_path = {toxinidir}/tests/
lib_path = {toxinidir}/lib
all_path = {[vars]src_path} {[vars]tst_path}
[testenv]
setenv =
PYTHONPATH = {toxinidir}:{[vars]src_path}:{[vars]lib_path}
PY_COLORS=1
[testenv:format]
deps =
black
isort
commands =
isort {[vars]all_path}
black {[vars]all_path}
[testenv:lint]
deps =
black
flake8
commands =
flake8 {[vars]all_path}
black --check {[vars]all_path}
[testenv:unit]
description = Run unit tests
deps =
pytest
pytest-cov
-r{toxinidir}/requirements.txt
commands =
pytest \
--cov={[vars]src_path} \
--cov-report=term-missing \
--cov-report=html \
--ignore={[vars]tst_path}integration \
-vv --tb native -s \
{posargs:[vars]tst_path}unit}
[testenv:integration]
description = Run integration tests
deps =
pytest
ipdb
juju
pytest-operator
-r{toxinidir}/requirements.txt
commands = pytest --asyncio-mode=auto --tb native --show-capture=no --log-cli-level=INFO -s {posargs} {[vars]tst_path}integration
[testenv:update]
deps =
pyyaml
semver
commands =
python {toxinidir}/upstream/update.py {posargs}
# mypy config
[mypy]
[mypy-ops.*]
ignore_missing_imports = True
[mypy-lightkube.*]
ignore_missing_imports = True
[isort]
profile = black