-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
67 lines (59 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
57
58
59
60
61
62
63
64
65
66
[flake8]
max-line-length = 99
extend-ignore = E203
select: E,W,F,C,N
exclude:
venv
.git
build
dist
*.egg_info
[tox]
skipsdist = True
envlist = lint,unit,integration
[vars]
cov_path = {toxinidir}/htmlcov
src_path = {toxinidir}/src/
tst_path = {toxinidir}/tests/
upstream_path = {toxinidir}/upstream/
tst_data_path = {toxinidir}/tests/data/
all_path = {[vars]src_path} {[vars]tst_path} {[vars]upstream_path}
[testenv]
setenv =
PYTHONPATH={toxinidir}:{toxinidir}/src
PYTHONBREAKPOINT=ipdb.set_trace
[testenv:format]
description = Apply coding style standards to code
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
ipdb
-r{toxinidir}/requirements.txt
commands =
pytest --cov={[vars]src_path} \
--cov-report=term-missing --cov-report=html \
--ignore={[vars]tst_path}integration \
-vvv --tb native -s \
{posargs:tests/unit}
[testenv:integration]
deps =
aiohttp
urllib3
pytest-operator
lightkube
commands = pytest --asyncio-mode=auto --tb native --show-capture=no --log-cli-level=INFO -s {posargs} {[vars]tst_path}integration