sepolgen: Replace usage of xrange inside of tests.

xrange function is gone in Python3 and instead range is
xrange by default. Also it doesnt seem to be important
to have xrange used in tests on Python2.

Signed-off-by: Robert Kuska <rkuska@redhat.com>
This commit is contained in:
Robert Kuska 2015-07-16 13:48:18 +02:00 committed by Stephen Smalley
parent 2747dfb880
commit c2ecb8e3ec
1 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ class TestUtilFunctions(unittest.TestCase):
status = [False] * 8
for av in access.avrule_to_access_vectors(rule):
self.assertEqual(av.perms, refpolicy.IdSet(["read", "write"]))
for i in xrange(len(comps)):
for i in range(len(comps)):
if comps[i][0] == av.src_type and \
comps[i][1] == av.tgt_type and \
comps[i][2] == av.obj_class:
@ -208,7 +208,7 @@ class TestAccessVectorSet(unittest.TestCase):
status = [False] * 8
for av in self.s:
self.assertEqual(av.perms, refpolicy.IdSet(["read", "write"]))
for i in xrange(len(comps)):
for i in range(len(comps)):
if comps[i][0] == av.src_type and \
comps[i][1] == av.tgt_type and \
comps[i][2] == av.obj_class: