Change in vdsm[ovirt-3.5]: tests: Fix Python 2.6 compatibility

mtayer at redhat.com mtayer at redhat.com
Wed Aug 27 21:39:03 UTC 2014


Hello Nir Soffer, Dan Kenigsberg,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/32102

to review the following change.

Change subject: tests: Fix Python 2.6 compatibility
......................................................................

tests: Fix Python 2.6 compatibility

Recent tests use set comprehension which is available only in Python
2.7, failing builds on EL machines.

Change-Id: Idf684f2dbee3a024d90d7d9fd7378636fad2ea8d
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1132677
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/31785
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M tests/toolTests.py
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/02/32102/1

diff --git a/tests/toolTests.py b/tests/toolTests.py
index f80c97e..53ddeba 100644
--- a/tests/toolTests.py
+++ b/tests/toolTests.py
@@ -58,8 +58,8 @@
         configurator,
         '_getConfigurers',
         lambda:  {
-            'a': MockModuleConfigurator('a', set('b')),
-            'b': MockModuleConfigurator('b', set('a'))
+            'a': MockModuleConfigurator('a', set(['b'])),
+            'b': MockModuleConfigurator('b', set(['a']))
         }
     )
     def testDependencyCircle(self):
@@ -73,10 +73,10 @@
         configurator,
         '_getConfigurers',
         lambda:  {
-            'a': MockModuleConfigurator('a', {'b', 'd'}),
-            'b': MockModuleConfigurator('b', {'c'}),
-            'c': MockModuleConfigurator('c', {'e', 'd'}),
-            'd': MockModuleConfigurator('d', {'e', 'e'}),
+            'a': MockModuleConfigurator('a', set(['b', 'd'])),
+            'b': MockModuleConfigurator('b', set(['c'])),
+            'c': MockModuleConfigurator('c', set(['e', 'd'])),
+            'd': MockModuleConfigurator('d', set(['e', 'e'])),
             'e': MockModuleConfigurator('e', set()),
             'f': MockModuleConfigurator('f', set()),
 
@@ -107,7 +107,7 @@
         configurator,
         '_getConfigurers',
         lambda: {
-            'a': MockModuleConfigurator('a', {'b', 'c'}),
+            'a': MockModuleConfigurator('a', set(['b', 'c'])),
             'b': MockModuleConfigurator('b', set()),
             'c': MockModuleConfigurator('c', set())
         }


-- 
To view, visit http://gerrit.ovirt.org/32102
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf684f2dbee3a024d90d7d9fd7378636fad2ea8d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list