Browse Source

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: I73f12f66e2b5a1c6612c84b2b332d2b34d4250b4
huang.zhiping 10 months ago
parent
commit
4b7b665d4a
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      tox.ini

+ 6
- 0
tox.ini View File

@@ -13,24 +13,30 @@ deps = -r{toxinidir}/test-requirements.txt
13 13
 commands = python setup.py test --slowest --testr-args='{posargs}'
14 14
 
15 15
 [testenv:pep8]
16
+basepython = python3
16 17
 commands =
17 18
   flake8 {posargs}
18 19
   bashate devstack/plugin.sh
19 20
 
20 21
 [testenv:venv]
22
+basepython = python3
21 23
 commands = {posargs}
22 24
 
23 25
 [testenv:cover]
26
+basepython = python3
24 27
 commands = python setup.py test --coverage --testr-args='{posargs}'
25 28
 
26 29
 [testenv:docs]
30
+basepython = python3
27 31
 commands = python setup.py build_sphinx
28 32
 
29 33
 [testenv:releasenotes]
34
+basepython = python3
30 35
 commands =
31 36
   sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
32 37
 
33 38
 [testenv:debug]
39
+basepython = python3
34 40
 commands = oslo_debug_helper {posargs}
35 41
 
36 42
 [flake8]

Loading…
Cancel
Save