From 270f66adcd943921c4cbd6840f6a85e9d9fbb95a Mon Sep 17 00:00:00 2001 From: Ryan Beisner Date: Mon, 28 Nov 2016 18:21:14 -0600 Subject: [PATCH] Update tox.ini for py27 requirement Reactive source charms are Python3-only, but have py27 unit tests declared in project-config. The Tox tool recently changed behavior. It used to pass when a tox target was missing commands. Now it fails in that case. This commit places a py27 no-op shim to allow gate tests to pass, effectively restoring the original behavior for these py3x-only repos. Change-Id: I547c0ae0ac93fe7a9321a8d4d9a9711190dd5249 Partial-Bug: 1642981 --- tox.ini | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 893f30f..3ba2b23 100644 --- a/tox.ini +++ b/tox.ini @@ -24,6 +24,14 @@ basepython = python2.7 commands = charm-build --log-level DEBUG -o {toxinidir}/build src {posargs} +[testenv:py27] +basepython = python2.7 +# Reactive source charms are Python3-only, but a py27 unit test target +# is required by OpenStack Governance. Remove this shim as soon as +# permitted. http://governance.openstack.org/reference/cti/python_cti.html +whitelist_externals = true +commands = true + [testenv:py34] basepython = python3.4 deps = -r{toxinidir}/test-requirements.txt @@ -35,7 +43,7 @@ deps = -r{toxinidir}/test-requirements.txt commands = ostestr {posargs} [testenv:pep8] -basepython = python2.7 +basepython = python3.5 deps = -r{toxinidir}/test-requirements.txt commands = flake8 {posargs} src unit_tests