summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhuang.zhiping <huang.zhiping@99cloud.net>2018-06-09 11:10:18 +0800
committerhuang.zhiping <huang.zhiping@99cloud.net>2018-06-09 11:11:10 +0800
commit086428009c90a4048d80a8b8dae86c7f024360c8 (patch)
treefc7be32f6854af86b91dc0b30ad90cfff9e3cb03
parent3973f07a70a2787af3c9851e8580f1a2b4c2885b (diff)
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
Notes
Notes (review): Code-Review+2: Witold Bedyk <witold.bedyk@est.fujitsu.com> Workflow+1: Witold Bedyk <witold.bedyk@est.fujitsu.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 18 Jun 2018 11:21:43 +0000 Reviewed-on: https://review.openstack.org/573887 Project: openstack/monasca-notification Branch: refs/heads/master
-rw-r--r--tox.ini7
1 files changed, 7 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index ec318a9..b763daf 100644
--- a/tox.ini
+++ b/tox.ini
@@ -26,6 +26,7 @@ commands =
26 ostestr {posargs} 26 ostestr {posargs}
27 27
28[testenv:cover] 28[testenv:cover]
29basepython = python3
29commands = 30commands =
30 coverage erase 31 coverage erase
31 python setup.py test --coverage --testr-args='{posargs}' \ 32 python setup.py test --coverage --testr-args='{posargs}' \
@@ -33,27 +34,33 @@ commands =
33 coverage report 34 coverage report
34 35
35[testenv:debug] 36[testenv:debug]
37basepython = python3
36commands = 38commands =
37 oslo_debug_helper -t ./monasca_notification/tests {posargs} 39 oslo_debug_helper -t ./monasca_notification/tests {posargs}
38 40
39[testenv:pep8] 41[testenv:pep8]
42basepython = python3
40commands = 43commands =
41 {[testenv:flake8]commands} 44 {[testenv:flake8]commands}
42 {[testenv:bandit]commands} 45 {[testenv:bandit]commands}
43 46
44[testenv:venv] 47[testenv:venv]
48basepython = python3
45commands = {posargs} 49commands = {posargs}
46 50
47[testenv:flake8] 51[testenv:flake8]
52basepython = python3
48commands = 53commands =
49 flake8 monasca_notification 54 flake8 monasca_notification
50 flake8 tests 55 flake8 tests
51 56
52[testenv:bandit] 57[testenv:bandit]
58basepython = python3
53commands = 59commands =
54 bandit -r monasca_notification -n5 -x monasca_notification/tests 60 bandit -r monasca_notification -n5 -x monasca_notification/tests
55 61
56[testenv:genconfig] 62[testenv:genconfig]
63basepython = python3
57description = Generates an example of monasca-notification configuration file 64description = Generates an example of monasca-notification configuration file
58commands = oslo-config-generator \ 65commands = oslo-config-generator \
59 --config-file={toxinidir}/config-generator/notification.conf 66 --config-file={toxinidir}/config-generator/notification.conf