[Piglit] [RESEND RFC 14/25] gen_tcs_input_tests.py: use six.moves.range
baker.dylan.c at gmail.com
baker.dylan.c at gmail.com
Wed Oct 21 10:20:23 PDT 2015
From: Dylan Baker <baker.dylan.c at gmail.com>
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
generated_tests/gen_tcs_input_tests.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/generated_tests/gen_tcs_input_tests.py b/generated_tests/gen_tcs_input_tests.py
index 5d2b4a5..9e761af 100644
--- a/generated_tests/gen_tcs_input_tests.py
+++ b/generated_tests/gen_tcs_input_tests.py
@@ -42,6 +42,8 @@ import os
import sys
import random
+from six.moves import range
+
class Test(object):
def __init__(self, type_name, array, name):
@@ -99,12 +101,12 @@ class Test(object):
data = self.test_data()
uniforms = ''
if self.var_array:
- for i in xrange(12):
- for j in xrange(self.var_array):
+ for i in range(12):
+ for j in range(self.var_array):
uniforms += 'uniform {0} reference[{1}].v[{2}] {3}\n'.format(
self.var_type, i, j, data[i*j])
else:
- for i in xrange(12):
+ for i in range(12):
uniforms += 'uniform {0} reference[{1}].v {2}\n'.format(
self.var_type,
i,
@@ -155,8 +157,8 @@ class Test(object):
c = self.components()
ret = []
- for i in xrange(n):
- ret.append(" ".join(str(rand()) for _ in xrange(c)))
+ for i in range(n):
+ ret.append(" ".join(str(rand()) for _ in range(c)))
return ret
--
2.6.1
More information about the Piglit
mailing list