summaryrefslogtreecommitdiff
path: root/nova/test.py
diff options
context:
space:
mode:
authorDavanum Srinivas <davanum@gmail.com>2015-06-03 07:55:04 -0400
committerDavanum Srinivas (dims) <davanum@gmail.com>2015-07-28 10:40:36 +0000
commit5bb1933cc4f0bb70eba5ae3c3134f825a062bcc6 (patch)
treeebe6e2da3165982f2cb52ed81756572fa6a8d34e /nova/test.py
parent8a73c0430db27501437fc2b6c1a354a121be7c45 (diff)
downloadnova-5bb1933cc4f0bb70eba5ae3c3134f825a062bcc6.tar.gz
Enable python34 tests for nova/tests/unit/scheduler/test*.py
nova/pci/stats.py: need to specify a key parameter which is a function that returns a sorting key. since the original intention with pool_cmp was to sort by number of items in each pool, we just use key parameter with a lambda nova/scheduler/filters/trusted_filter.py nova/scheduler/host_manager.py needed list() so we could delete stuff inside the loop in py3 nova/tests/unit/scheduler/test_filter_scheduler.py needed the import of test as some tests were failing in py3, added noqa as test is not explicitly referenced within the module nova/tests/unit/scheduler/test_scheduler_options.py need BytesIO for py3, StringIO will fail in many tests nova/tests/unit/scheduler/test_scheduler_utils.py message is not available in py3, so we need to adjust use test.nested already added in a previous commit nova/test.py if we have a key which is a list, treat it just like a set nova/utils.py use reduce from six and explicitly typcast version_int as an integer Change-Id: Ic862873f38767f12b990a030b5812ae50a44c4d0
Diffstat (limited to 'nova/test.py')
-rw-r--r--nova/test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/test.py b/nova/test.py
index 44dede65d2..e5944baf49 100644
--- a/nova/test.py
+++ b/nova/test.py
@@ -295,7 +295,7 @@ class TestCase(testtools.TestCase):
observed = jsonutils.loads(observed)
def sort_key(x):
- if isinstance(x, set) or isinstance(x, datetime.datetime):
+ if isinstance(x, (set, list)) or isinstance(x, datetime.datetime):
return str(x)
if isinstance(x, dict):
items = ((sort_key(key), sort_key(value))