]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
suite/matrix: make test_build_matrix py3 compat
authorKyr Shatskyy <kyrylo.shatskyy@suse.com>
Wed, 20 Nov 2019 00:01:29 +0000 (01:01 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Thu, 21 Nov 2019 21:16:10 +0000 (22:16 +0100)
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
teuthology/suite/test/test_build_matrix.py

index aaaa4a11e87cb0e7b917f9c8e9db035432a4842b..d0476c3461edd1d728a6ff55a3c96407fa488dc3 100644 (file)
@@ -24,7 +24,7 @@ class TestBuildMatrix(object):
         'os.listdir',
         'os.path.isfile',
         'os.path.isdir',
-        '__builtin__.open',
+        'teuthology.suite.open',
     ]
 
     def setup(self):
@@ -582,7 +582,7 @@ class TestSubset(object):
         'os.listdir',
         'os.path.isfile',
         'os.path.isdir',
-        '__builtin__.open',
+        'teuthology.suite.open',
     ]
 
     def setup(self):
@@ -637,9 +637,9 @@ class TestSubset(object):
                     sub_max_facets, max_fanout,
                     max_depth - 1, namegen, top=False)
                 if subtree is not None:
-                    tree[namegen.next()] = subtree
+                    tree[next(namegen)] = subtree
                 else:
-                    tree[yamilify(namegen.next())] = None
+                    tree[yamilify(next(namegen))] = None
             random.choice([
                 lambda: tree.update({'%': None}),
                 lambda: None])()