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: Id2964291cd5e56af09f84d1aeab8138c10f9758f Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
c4c7633e27
commit
96756ff916
|
@ -275,7 +275,7 @@ class Requestify(wsgi.Middleware):
|
|||
except KeyError:
|
||||
raise webob.exc.HTTPBadRequest()
|
||||
except exception.InvalidRequest as err:
|
||||
raise webob.exc.HTTPBadRequest(explanation=unicode(err))
|
||||
raise webob.exc.HTTPBadRequest(explanation=err.format_message())
|
||||
|
||||
LOG.debug('action: %s', action)
|
||||
for key, value in args.items():
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from six.moves import range
|
||||
import time
|
||||
|
||||
from rally.common.i18n import _
|
||||
|
@ -82,7 +83,7 @@ class EC2Objects(context.Context):
|
|||
result["subnet_id"] = subnet_id
|
||||
|
||||
result["ni_ids"] = list()
|
||||
for dummy in xrange(0, ni_count):
|
||||
for dummy in range(0, ni_count):
|
||||
data = client.create_network_interface(SubnetId=subnet_id)
|
||||
ni_id = data['NetworkInterface']['NetworkInterfaceId']
|
||||
result["ni_ids"].append(ni_id)
|
||||
|
@ -145,7 +146,7 @@ class EC2Objects(context.Context):
|
|||
ids = self.context["tenants"][tenant_id].get("servers", [])
|
||||
servers_per_run = self.config["servers_per_run"]
|
||||
mod = len(ids) / servers_per_run
|
||||
for i in xrange(0, mod):
|
||||
for i in range(0, mod):
|
||||
part_ids = ids[i * servers_per_run:(i + 1) * servers_per_run]
|
||||
data = client.terminate_instances(InstanceIds=part_ids)
|
||||
part_ids = ids[mod * servers_per_run:]
|
||||
|
@ -264,7 +265,7 @@ class FakeNetworkGenerator(EC2Objects):
|
|||
self.context["tenants"][tenant_id]["networks"] = list()
|
||||
subnets_count = self.config["subnets_per_tenant"]
|
||||
nis_count = self.config["nis_per_subnet"]
|
||||
for dummy in xrange(0, subnets_count):
|
||||
for dummy in range(0, subnets_count):
|
||||
self.prepare_network(tenant_id, client, nis_count)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `EC2 Networks`"))
|
||||
|
|
5
tox.ini
5
tox.ini
|
@ -39,6 +39,7 @@ commands =
|
|||
stestr slowest
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands =
|
||||
flake8 {posargs}
|
||||
|
||||
|
@ -46,9 +47,11 @@ commands =
|
|||
commands = oslo-config-generator --config-file=etc/ec2api/ec2api-config-generator.conf
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
# This environment is called from CI scripts to test and publish
|
||||
# the API Ref and Docs to developer.openstack.org.
|
||||
commands = python setup.py build_sphinx
|
||||
|
@ -67,7 +70,7 @@ commands =
|
|||
# H102 Apache 2.0 license header not found
|
||||
|
||||
ignore = E121,E122,E123,E124,E126,E127,E128,E711,E712,H102,H303,H404,F403,F811,F841
|
||||
# H106: Don’t put vim configuration in source files
|
||||
# H106: Don't put vim configuration in source files
|
||||
# H203: Use assertIs(Not)None to check for None
|
||||
enable-extensions=H106,H203
|
||||
exclude = .venv,.git,.tox,dist,envname,*lib/python*,*egg,build,tools
|
||||
|
|
Loading…
Reference in New Issue