-
Notifications
You must be signed in to change notification settings - Fork 36
/
tox.ini
53 lines (49 loc) · 1.37 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
[tox]
skipsdist=True
skip_missing_interpreters = True
[testenv]
basepython = python3.8
[testenv:unit]
allowlist_externals =
echo
rm
touch
commands =
echo "Canceling the test before completion creates __init__.py files \
which could cause undesired behaviours. Make sure to delete the __init__.py files manually."
; Check for Python 3.5 compatibility to ensure Xenial support
mypy --ignore-missing-imports --python-version 3.5 {toxinidir}/lib/charms/layer/jenkins {posargs}
mypy --ignore-missing-imports --python-version 3.5 {toxinidir}/reactive {posargs}
; Execute unit tests
touch {toxinidir}/lib/charms/__init__.py
touch {toxinidir}/lib/charms/layer/__init__.py
coverage erase
coverage run -m testtools.run discover unit_tests
coverage report -m
rm -f {toxinidir}/lib/charms/__init__.py
rm -f {toxinidir}/lib/charms/layer/__init__.py
deps =
-r{toxinidir}/requirements.txt
fixtures
charm-test>=0.2.0
fakesleep
coverage
mypy
types-setuptools
types-requests
setenv =
PYTHONPATH = {toxinidir}/lib/
[flake8]
exclude=docs
[testenv:integration]
description = Run integration tests
deps =
pytest
juju>=2,<3
pytest-operator
pytest-asyncio
ops
packaging
-r{toxinidir}/requirements.txt
commands =
pytest -x -v --tb native --ignore=unit_tests --log-cli-level=INFO -s {posargs}