Merge "Fix all py3 related issues"

This commit is contained in:
Jenkins 2015-01-27 23:23:34 +00:00 committed by Gerrit Code Review
commit d249772721
4 changed files with 8 additions and 4 deletions

View File

@ -15,6 +15,7 @@ classifier =
Operating System :: POSIX :: Linux Operating System :: POSIX :: Linux
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 2 Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7 Programming Language :: Python :: 2.7
[files] [files]

View File

@ -70,11 +70,11 @@ def setup_dict(data, required=None, defaults=None):
:raises: IndexError, ValueError :raises: IndexError, ValueError
""" """
required = required or [] required = required or []
for i in set(required) - set(data.keys()): for i in set(required) - set(data):
raise IndexError("Missed: %s" % i) raise IndexError("Missed: %s" % i)
defaults = defaults or {} defaults = defaults or {}
for i in set(data.keys()) - set(required + defaults.keys()): for i in set(data) - set(required) - set(defaults):
raise ValueError("Unexpected: %s" % i) raise ValueError("Unexpected: %s" % i)
defaults.update(data) defaults.update(data)

View File

@ -45,6 +45,9 @@ class TestCase(base.BaseTestCase):
self.assertIsNotNone(action_duration) self.assertIsNotNone(action_duration)
self.assertIsInstance(action_duration, float) self.assertIsInstance(action_duration, float)
def assertSequenceEqual(self, iterable_1, iterable_2):
self.assertEqual(tuple(iterable_1), tuple(iterable_2))
class DBTestCase(TestCase): class DBTestCase(TestCase):
"""Base class for tests which use DB.""" """Base class for tests which use DB."""

View File

@ -1,7 +1,7 @@
[tox] [tox]
minversion = 1.6 minversion = 1.6
skipsdist = True skipsdist = True
envlist = py26,py27,pep8 envlist = py26,py27,py33,py34,pep8
[testenv] [testenv]
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
@ -41,7 +41,7 @@ downloadcache = ~/cache/pip
ignore = E126,H703 ignore = E126,H703
show-source = true show-source = true
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,*rally/verification/verifiers/tempest/openstack-tempest*,build,*rally/openstack* exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build,*rally/openstack*
[hacking] [hacking]
import_exceptions = rally.common.i18n import_exceptions = rally.common.i18n