-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
60 lines (52 loc) · 1.53 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
[tox]
minversion = 3.0.0
skipsdist = True
skip_missing_interpreters = True
envlist = lint, unit
[vars]
src_path = {toxinidir}/src
tst_path = {toxinidir}/tests
all_path = {[vars]src_path} {[vars]tst_path}
[testenv]
basepython = python3
allowlist_externals =
charmcraft
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/lib:{[vars]src_path}
PYTHONBREAKPOINT=ipdb.set_trace
PY_COLORS=1
[testenv:unit]
description = Run unit tests
deps =
pytest
pytest-operator
-r{toxinidir}/requirements.txt
commands =
pytest -v --tb native --log-cli-level=INFO -s {[vars]tst_path} {posargs}
;pytest -v --tb native --log-cli-level=INFO -s {[vars]tst_path}/unit {posargs}
[testenv:integration]
description = Run integration tests
deps =
pytest
pytest-operator
-r{toxinidir}/requirements.txt
commands =
pytest -v --tb native --log-cli-level=INFO -s {[vars]tst_path} {posargs}
;pytest -v --tb native --log-cli-level=INFO -s {[vars]tst_path}/integration {posargs}
[testenv:lint]
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:build]
# deps = -r{toxinidir}/requirements-dev.txt
commands =
charmcraft pack --verbose
[isort]
force_single_line = True
[flake8]
exclude = .tox/*,build/*,docs/*,.env/*,get-pip.py,migrations/*
ignore = D203, D100, D103, D202, D205, D400, D413, W503
import-order-style = google
max-line-length = 120
statistics = True
; flake8-colors
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s