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

+ 7
- 0
tox.ini View File

@@ -26,6 +26,7 @@ commands =
26 26
  ostestr {posargs}
27 27
 
28 28
 [testenv:cover]
29
+basepython = python3
29 30
 commands =
30 31
   coverage erase
31 32
   python setup.py test --coverage --testr-args='{posargs}' \
@@ -33,27 +34,33 @@ commands =
33 34
   coverage report
34 35
 
35 36
 [testenv:debug]
37
+basepython = python3
36 38
 commands =
37 39
   oslo_debug_helper -t ./monasca_notification/tests {posargs}
38 40
 
39 41
 [testenv:pep8]
42
+basepython = python3
40 43
 commands =
41 44
   {[testenv:flake8]commands}
42 45
   {[testenv:bandit]commands}
43 46
 
44 47
 [testenv:venv]
48
+basepython = python3
45 49
 commands = {posargs}
46 50
 
47 51
 [testenv:flake8]
52
+basepython = python3
48 53
 commands =
49 54
   flake8 monasca_notification
50 55
   flake8 tests
51 56
 
52 57
 [testenv:bandit]
58
+basepython = python3
53 59
 commands =
54 60
   bandit -r monasca_notification -n5 -x monasca_notification/tests
55 61
 
56 62
 [testenv:genconfig]
63
+basepython = python3
57 64
 description = Generates an example of monasca-notification configuration file
58 65
 commands = oslo-config-generator \
59 66
   --config-file={toxinidir}/config-generator/notification.conf

Loading…
Cancel
Save