1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

selftest: enable py3 for samba.tests.kcc.graph

In Python 3, range() will not return a list any more.
So `range(7) * 4` will not work.
Convert range to list to fix.

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>
This commit is contained in:
Joe Guo 2018-04-04 11:29:41 +12:00 committed by Andrew Bartlett
parent 5d774fa732
commit a5bc4d8c7a
2 changed files with 5 additions and 5 deletions

View File

@ -53,8 +53,8 @@ class GraphFunctionTests(samba.tests.TestCase):
([0xff] * 84, 84 * 8),
([0xaa] * 84, 84 * 4),
([0x03, 0x33] * 42, 42 * 6),
(range(7) * 12, 12 * 9),
(range(4) * 21, 21 * 4)):
(list(range(7)) * 12, 12 * 9),
(list(range(4)) * 21, 21 * 4)):
self.assertEquals(total_schedule(schedule), total)
def test_convert_schedule_to_repltimes(self):
@ -63,7 +63,7 @@ class GraphFunctionTests(samba.tests.TestCase):
(None, [0x11] * 84),
([0x06] * 168, [0x66] * 84),
([0x03, 0xa] * 84, [0x3a] * 84),
(range(7) * 24,
(list(range(7)) * 24,
[0x01, 0x23, 0x45, 0x60, 0x12, 0x34, 0x56] * 12)):
schedule = ntdsconn_schedule(ntdsconn_times)
self.assertEquals(convert_schedule_to_repltimes(schedule),

View File

@ -148,8 +148,8 @@ plantestsuite(
planpythontestsuite("none", "samba.tests.upgradeprovision", py3_compatible=True)
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")
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.ldif_import_export")
planpythontestsuite("none", "samba.tests.graph")