-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
50 lines (44 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
[tox]
minversion = 3.18
envlist = py311,flake8
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
commands =
stestr run {posargs}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:flake8]
deps =
flake8
pbr
commands = flake8 {toxinidir}/pollinate
[flake8]
filename = *.py
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405,W503
enable-extensions = H106,H203,H904
[testenv:cover]
whitelist_externals = sh
setenv =
{[testenv]setenv}
PYTHON=coverage run --source pollinate --parallel-mode
commands =
coverage erase
sh -c 'OS_TEST_PATH={toxinidir}/pollinate/tests/unit stestr run {posargs}'
coverage combine
# Generate a new HTML report with the combined results
# otherwise the HTML report will only show partial results
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report --fail-under=90 --skip-covered
[testenv:genconfig]
envdir = {toxworkdir}/shared
commands =
oslo-config-generator --config-file=etc/nova-pollinate/config-generator.conf
[testenv:functional]
# This will use whatever 'basepython' is set to, so the name is ambiguous.
setenv = OS_TEST_PATH={toxinidir}/pollinate/tests/functional