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: Icb9a9fdc11393042cf1c96a7cc1a523cfb531f32
huang.zhiping 10 months ago
parent
commit
d8cd0ceee7
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      tox.ini

+ 8
- 0
tox.ini View File

@@ -17,33 +17,41 @@ whitelist_externals = bash
17 17
                       find
18 18
 
19 19
 [testenv:pep8]
20
+basepython = python3
20 21
 commands =
21 22
     flake8 {posargs}
22 23
 
23 24
 [testenv:venv]
25
+basepython = python3
24 26
 commands = {posargs}
25 27
 
26 28
 [testenv:cover]
29
+basepython = python3
27 30
 commands = python setup.py test --coverage \
28 31
            --coverage-package-name=muranoagent --testr-args='{posargs}'
29 32
            coverage report --omit '*/tests/*'
30 33
 
31 34
 [testenv:debug]
35
+basepython = python3
32 36
 commands =
33 37
   find . -type f -name "*.pyc" -delete
34 38
   oslo_debug_helper -t muranoagent/tests {posargs}
35 39
 
36 40
 [testenv:docs]
41
+basepython = python3
37 42
 commands = python setup.py build_sphinx
38 43
 
39 44
 [testenv:pyflakes]
45
+basepython = python3
40 46
 deps = flake8
41 47
 commands = flake8
42 48
 
43 49
 [testenv:genconfig]
50
+basepython = python3
44 51
 commands = oslo-config-generator --config-file etc/oslo-config-generator/muranoagent.conf
45 52
 
46 53
 [testenv:releasenotes]
54
+basepython = python3
47 55
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
48 56
 
49 57
 [flake8]

Loading…
Cancel
Save