From: Dylan Baker <baker.dyla...@gmail.com> This is xrange on python 2.x and range on 3.x
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com> --- framework/test/base.py | 4 +++- tests/all.py | 4 +++- unittests/summary_common_tests.py | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/framework/test/base.py b/framework/test/base.py index faad043..43f81c4 100644 --- a/framework/test/base.py +++ b/framework/test/base.py @@ -34,6 +34,8 @@ import copy import signal import warnings +from six.moves import range + try: # subprocess32 only supports *nix systems, this is important because # "start_new_session" is not a valid argument on windows @@ -341,7 +343,7 @@ class WindowResizeMixin(object): Test.run() to return early. """ - for _ in xrange(5): + for _ in range(5): super(WindowResizeMixin, self)._run_command() if "Got spurious window resize" not in self.result.out: return diff --git a/tests/all.py b/tests/all.py index 83ad945..c49dede 100644 --- a/tests/all.py +++ b/tests/all.py @@ -6,6 +6,8 @@ import itertools import os import platform +from six.moves import range + from framework import grouptools from framework.profile import TestProfile from framework.test import (PiglitGLTest, GleanTest, ShaderTest, @@ -2076,7 +2078,7 @@ with profile.group_manager( for stage, type_, comp, sampler in itertools.product( stages, types, comps, samplers): for func in ['textureGather'] if 'Cube' in sampler else ['textureGather', 'textureGatherOffset', 'textureGatherOffsets']: - for cs in xrange(len(comp)): + for cs in range(len(comp)): assert cs <= 3 address_mode = 'clamp' if sampler == '2DRect' else 'repeat' cmd = ['textureGather', stage, diff --git a/unittests/summary_common_tests.py b/unittests/summary_common_tests.py index 93fecaf..041961f 100644 --- a/unittests/summary_common_tests.py +++ b/unittests/summary_common_tests.py @@ -25,6 +25,7 @@ from __future__ import absolute_import, division, print_function import datetime import nose.tools as nt +from six.moves import range from framework import results, status, grouptools from framework.summary import common as summary @@ -245,7 +246,7 @@ class TestNamesSubtests(object): def test_all(self): """summary.Names.all: Handles subtests as groups""" baseline = {'foo', 'bar', 'oink', 'bonk', 'oink', 'tonk'} - for x in xrange(1, 6): + for x in range(1, 6): baseline.add(grouptools.join('bor', str(x))) nt.eq_(self.test.names.all, baseline) -- 2.7.0 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit