selftest: enable py3 for samba.tests.kcc.graph_utils
authorJoe Guo <joeg@catalyst.net.nz>
Wed, 4 Apr 2018 01:07:38 +0000 (13:07 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 5 Apr 2018 06:59:10 +0000 (08:59 +0200)
zip will not return a list in Python 3.
Convert to list.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/tests/kcc/graph_utils.py
selftest/tests.py

index 2146fc9c7e132bd8b9a9ef5e301339b36513d975..b027838e78f3257e7c56ec74c14040878525189a 100644 (file)
@@ -54,7 +54,7 @@ class UndirectedGraphTests(samba.tests.TestCase):
         vertices2 = tuple('ijk')
         edges = tuple(itertools.combinations(vertices, 2))
         edges2 = tuple(itertools.combinations(vertices2, 2))
-        line_edges = zip(vertices[1:], vertices[:-1])
+        line_edges = list(zip(vertices[1:], vertices[:-1]))
         ring_edges = line_edges + [(vertices[0], vertices[-1])]
 
         tree = make_tree(vertices)
index 227857c70eb90905a2c9183b4a9ee877851a3864..26e053fce792045c66dfd6c65b4e06f3bdd9511b 100644 (file)
@@ -150,7 +150,7 @@ planpythontestsuite("none", "samba.tests.xattr", py3_compatible=True)
 planpythontestsuite("none", "samba.tests.ntacls", py3_compatible=True)
 planpythontestsuite("none", "samba.tests.policy", py3_compatible=True)
 planpythontestsuite("none", "samba.tests.kcc.graph", py3_compatible=True)
-planpythontestsuite("none", "samba.tests.kcc.graph_utils")
+planpythontestsuite("none", "samba.tests.kcc.graph_utils", py3_compatible=True)
 planpythontestsuite("none", "samba.tests.kcc.ldif_import_export")
 planpythontestsuite("none", "samba.tests.graph")
 plantestsuite("wafsamba.duplicate_symbols", "none", [os.path.join(srcdir(), "buildtools/wafsamba/test_duplicate_symbol.sh")])