-
Notifications
You must be signed in to change notification settings - Fork 128
/
tox.ini
64 lines (55 loc) · 2.04 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
61
62
63
64
[tox]
envlist = pep8,py3
skipsdist = true
sitepackages = false
# NOTE(beisner): Avoid false positives by not skipping missing interpreters.
# NOTE(beisner): Avoid pollution by not enabling sitepackages.
# NOTE(beisner): the 'py3' env is useful to "just give me whatever py3 is here."
# NOTE(beisner): the 'py3x' envs are useful to use a distinct interpreter version (will fail if not found)
ignore_basepython_conflict = true
# NOTES:
# * We avoid the new dependency resolver by pinning pip < 20.3, see
# https://github.com/pypa/pip/issues/9187
# * Pinning dependencies requires tox >= 3.2.0, see
# https://tox.readthedocs.io/en/latest/config.html#conf-requires
# * It is also necessary to pin virtualenv as a newer virtualenv would still
# lead to fetching the latest pip in the func* tox targets, see
# https://stackoverflow.com/a/38133283
requires = pip < 20.3
virtualenv < 20.0
tox < 4.0
# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci
minversion = 3.2.0
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
install_command = {toxinidir}/pip.sh install {opts} {packages}
passenv = HOME TERM
commands = nosetests -s --nologcapture {posargs} --with-coverage --cover-package=charmhelpers tests/
deps = -r{toxinidir}/test-requirements.txt
[testenv:py3]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
[testenv:py36]
basepython = python3.6
deps = -r{toxinidir}/test-requirements.txt
[testenv:py37]
basepython = python3.7
deps = -r{toxinidir}/test-requirements.txt
[testenv:py38]
basepython = python3.8
deps = -r{toxinidir}/test-requirements.txt
[testenv:py310]
basepython = python3.10
deps = -r{toxinidir}/test-requirements.txt
commands = nose2 {posargs} --with-coverage -s tests/
[testenv:py311]
basepython = python3.11
deps = -r{toxinidir}/test-requirements.txt
commands = nose2 {posargs} --with-coverage -s tests/
[testenv:pep8]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
commands = flake8 -v {posargs} charmhelpers tests tools
[flake8]
ignore = E402,E501,E741,E722,W504