fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I0980a08f35965292a705ad7299cfdc9a433dfc87
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann
5 years ago
3 | 3 | skipsdist = True |
4 | 4 | |
5 | 5 | [testenv] |
6 | basepython = python3 | |
7 | 6 | usedevelop = True |
8 | 7 | install_command = pip install {opts} {packages} |
9 | 8 | setenv = |
19 | 18 | basepython = python2.7 |
20 | 19 | |
21 | 20 | [testenv:pep8] |
21 | basepython = python3 | |
22 | 22 | commands = |
23 | 23 | flake8 |
24 | 24 | bandit -r castellan -x tests -s B105,B106,B107,B607 |
25 | 25 | |
26 | 26 | [testenv:bandit] |
27 | basepython = python3 | |
27 | 28 | # This command runs the bandit security linter against the castellan |
28 | 29 | # codebase minus the tests directory. Some tests are being excluded to |
29 | 30 | # reduce the number of positives before a team inspection, and to ensure a |
36 | 37 | bandit -r castellan -x tests -s B105,B106,B107,B607 |
37 | 38 | |
38 | 39 | [testenv:venv] |
40 | basepython = python3 | |
39 | 41 | commands = {posargs} |
40 | 42 | |
41 | 43 | [testenv:debug] |
44 | basepython = python3 | |
42 | 45 | commands = oslo_debug_helper {posargs} |
43 | 46 | |
44 | 47 | [testenv:cover] |
48 | basepython = python3 | |
45 | 49 | commands = |
46 | 50 | python setup.py testr --coverage --testr-args='{posargs}' |
47 | 51 | coverage report |
48 | 52 | |
49 | 53 | [testenv:docs] |
54 | basepython = python3 | |
50 | 55 | commands = python setup.py build_sphinx |
51 | 56 | |
52 | 57 | [testenv:releasenotes] |
58 | basepython = python3 | |
53 | 59 | commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
54 | 60 | |
55 | 61 | [testenv:functional] |
71 | 77 | {toxinidir}/tools/setup-vault-env.sh pifpaf -e VAULT_TEST run vault -- python setup.py testr --slowest --testr-args='{posargs}' |
72 | 78 | |
73 | 79 | [testenv:genconfig] |
80 | basepython = python3 | |
74 | 81 | commands = |
75 | 82 | oslo-config-generator --config-file=etc/castellan/functional-config-generator.conf |
76 | 83 | oslo-config-generator --config-file=etc/castellan/sample-config-generator.conf |
86 | 93 | import_exceptions = castellan.i18n |
87 | 94 | |
88 | 95 | [testenv:lower-constraints] |
96 | basepython = python3 | |
89 | 97 | deps = |
90 | 98 | -c{toxinidir}/lower-constraints.txt |
91 | 99 | -r{toxinidir}/test-requirements.txt |