From ff6642820179d7921055afa39f38609b4c7b8c0d Mon Sep 17 00:00:00 2001 From: Joe Guo Date: Wed, 4 Apr 2018 13:07:38 +1200 Subject: [PATCH] selftest: enable py3 for samba.tests.kcc.graph_utils zip will not return a list in Python 3. Convert to list. Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- python/samba/tests/kcc/graph_utils.py | 2 +- selftest/tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/samba/tests/kcc/graph_utils.py b/python/samba/tests/kcc/graph_utils.py index 2146fc9c7e13..b027838e78f3 100644 --- a/python/samba/tests/kcc/graph_utils.py +++ b/python/samba/tests/kcc/graph_utils.py @@ -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) diff --git a/selftest/tests.py b/selftest/tests.py index 227857c70eb9..26e053fce792 100644 --- a/selftest/tests.py +++ b/selftest/tests.py @@ -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")]) -- 2.34.1