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: If1575ac4d8250bec1f445de7cb0ebcb398bd4e8d Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
20de6b5e66
commit
08f284f201
|
@ -13,6 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from six.moves import range
|
||||
import time
|
||||
|
||||
import botocore.exceptions
|
||||
|
@ -48,7 +49,7 @@ class TagsPagingTest(scenario_base.BaseScenarioTest):
|
|||
self.get_volume_waiter().wait_available(volume_id)
|
||||
|
||||
keys = list()
|
||||
for dummy in xrange(0, self.TAGS_COUNT):
|
||||
for dummy in range(0, self.TAGS_COUNT):
|
||||
key = data_utils.rand_name('key')
|
||||
value = 'aaa' if dummy < 6 else 'bbb'
|
||||
data = self.client.create_tags(Resources=[volume_id],
|
||||
|
@ -167,7 +168,7 @@ class VolumesPagingTest(scenario_base.BaseScenarioTest):
|
|||
|
||||
zone = CONF.aws.aws_zone
|
||||
cls.ids = list()
|
||||
for dummy in xrange(0, cls.VOLUMES_COUNT):
|
||||
for dummy in range(0, cls.VOLUMES_COUNT):
|
||||
data = cls.client.create_volume(Size=1, AvailabilityZone=zone)
|
||||
volume_id = data['VolumeId']
|
||||
cls.addResourceCleanUpStatic(cls.client.delete_volume,
|
||||
|
@ -338,7 +339,7 @@ class InstancePagingTest(scenario_base.BaseScenarioTest):
|
|||
'MinCount': cls.INSTANCES_IN_RESERVATIONS_COUNT,
|
||||
'MaxCount': cls.INSTANCES_IN_RESERVATIONS_COUNT
|
||||
}
|
||||
for dummy in xrange(0, cls.RESERVATIONS_COUNT):
|
||||
for dummy in range(0, cls.RESERVATIONS_COUNT):
|
||||
data = cls.client.run_instances(*[], **kwargs)
|
||||
for instance in data['Instances']:
|
||||
cls.ids.append(instance['InstanceId'])
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# under the License.
|
||||
|
||||
import os
|
||||
import six
|
||||
import sys
|
||||
import time
|
||||
import urllib2
|
||||
|
@ -162,7 +163,7 @@ class VpnTest(scenario_base.BaseScenarioTest):
|
|||
LOG.warning(output)
|
||||
except Exception:
|
||||
pass
|
||||
raise exc_info[1], None, exc_info[2]
|
||||
six.reraise(exc_info[1], None, exc_info[2])
|
||||
time.sleep(10)
|
||||
|
||||
ssh_client.exec_command('ping -c 4 %s' % private_ip_in_vpc)
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -26,9 +26,11 @@ commands =
|
|||
rm -f .testrepository/times.dbm
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands = flake8 {posargs}
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:debug]
|
||||
|
@ -40,7 +42,7 @@ commands = oslo_debug_helper {posargs}
|
|||
show-source = True
|
||||
ignore = E122,E123,E125,E126,E127,E128
|
||||
builtins = _
|
||||
# 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,doc,*lib/python*,*egg,build
|
||||
|
|
Loading…
Reference in New Issue