-
Notifications
You must be signed in to change notification settings - Fork 12
/
tox.ini
54 lines (47 loc) · 1.23 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
# This is a template `tox.ini` file for snaps
# This file is managed by bootstack-charms-spec and should not be modified
# within individual snap repos. https://launchpad.net/bootstack-charms-spec
[tox]
skipsdist=True
envlist = lint, unit, mocked-plans
skip_missing_interpreters = True
[testenv]
basepython = python3
setenv =
PYTHONPATH={toxinidir}
TEST_PYTHON_PACKAGE={envdir}
# Set TEST_JUJU3 To unpin juju<3 in zaza
TEST_JUJU3 = 1
[testenv:lint]
commands =
pflake8
pylint --recursive=y .
mypy --install-types --non-interactive .
black --check --diff --color .
isort --check --diff --color .
codespell
deps =
.[lint]
{[testenv:unit]deps}
{[testenv:func]deps}
[testenv:reformat]
deps = {[testenv:lint]deps}
commands =
black .
isort .
[testenv:unit]
deps = .[unittests]
commands = pytest {toxinidir}/tests/unit \
{posargs:-v --cov --cov-report=term-missing --cov-report=html --cov-report=xml}
[testenv:mocked-plans]
deps = .[unittests]
commands = pytest {toxinidir}/tests/mocked_plans/ {posargs:-s -vv}
[testenv:func]
changedir = {toxinidir}/tests/functional
deps = .[functests]
passenv =
TEST_SNAP
OS_*
USER
commands =
functest-run-suite {posargs:--keep-faulty-model}