-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
47 lines (41 loc) · 940 Bytes
/
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
# Copyright 2023 Canonical
# See LICENSE file for licensing details.
[tox]
skip_missing_interpreters = True
env_list = format, lint, unit
min_version = 4.0.0
[vars]
src_path = {toxinidir}/charms
tst_path = {toxinidir}/tests
all_path = {[vars]src_path} {[vars]tst_path}
[testenv]
set_env =
PYTHONBREAKPOINT=pdb.set_trace
PY_COLORS=1
[testenv:format]
description = Apply coding style standards to code
deps = ruff
commands =
ruff format {[vars]all_path}
ruff check --fix {[vars]all_path}
[testenv:lint]
description = Check code against coding style standards
deps =
ruff
tomli
codespell
commands =
codespell {toxinidir}
ruff check {[vars]all_path}
[testenv:unit]
deps =
pytest-cov
pytest-html
commands =
pytest \
-vv \
--cov={envsitepackagesdir}/charms \
--cov-report=term-missing \
--tb=native \
--log-cli-level=INFO \
{posargs:{[vars]tst_path}/unit}