[Piglit] [RESEND RFC 05/25] gen_tes_input_tests.py: cleanup whitespace issues

baker.dylan.c at gmail.com baker.dylan.c at gmail.com
Wed Oct 21 10:20:14 PDT 2015


From: Dylan Baker <baker.dylan.c at gmail.com>

these are mostly bad hanging indents or oddly placed spaces

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 generated_tests/gen_tes_input_tests.py | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/generated_tests/gen_tes_input_tests.py b/generated_tests/gen_tes_input_tests.py
index 110193a..bff1c8e 100644
--- a/generated_tests/gen_tes_input_tests.py
+++ b/generated_tests/gen_tes_input_tests.py
@@ -130,13 +130,13 @@ class Test(object):
             for i in xrange(self.reference_size):
                 for j in xrange(self.var_array):
                     uniforms += 'uniform {0} reference[{1}].v[{2}] {3}\n'.format(
-                            self.var_type, i, j, data[i*j])
+                        self.var_type, i, j, data[i*j])
         else:
             for i in xrange(self.reference_size):
                 uniforms += 'uniform {0} reference[{1}].v {2}\n'.format(
-                        self.var_type,
-                        i,
-                        data[i])
+                    self.var_type,
+                    i,
+                    data[i])
 
         #strip last newline
         return uniforms[:-1]
@@ -172,13 +172,13 @@ class Test(object):
             n = self.reference_size
 
         if self.var_type.startswith('i'):
-            rand = lambda : random.randint(-0x80000000, 0x7fffffff)
+            rand = lambda: random.randint(-0x80000000, 0x7fffffff)
         elif self.var_type.startswith('u'):
-            rand = lambda : random.randint(0, 0xffffffff)
+            rand = lambda: random.randint(0, 0xffffffff)
         else:
-            rand = lambda : ((-1 + 2 * random.randint(0, 1)) *
-                             random.randint(0, 2**23-1) *
-                             2.0**(random.randint(-126, 127)))
+            rand = lambda: ((-1 + 2 * random.randint(0, 1)) *
+                            random.randint(0, 2**23-1) *
+                            2.0**(random.randint(-126, 127)))
 
         c = self.components()
 
@@ -301,8 +301,7 @@ relative probe rgb (0.25, 0.75) (0.0, 1.0, 0.0)
 relative probe rgb (0.75, 0.75) (0.0, 1.0, 0.0)
 """
 
-        test = test.format(self = self,
-            generator_command = " ".join(sys.argv))
+        test = test.format(self=self, generator_command=" ".join(sys.argv))
 
         filename = self.filename()
         dirname = os.path.dirname(filename)
@@ -313,7 +312,7 @@ relative probe rgb (0.75, 0.75) (0.0, 1.0, 0.0)
 
 
 def all_tests():
-    for type_name in ['float', 'vec2',  'vec3',  'vec4',
+    for type_name in ['float', 'vec2', 'vec3', 'vec4',
                       'mat2', 'mat3', 'mat4',
                       'mat2x3', 'mat2x4', 'mat3x2',
                       'mat3x4', 'mat4x2', 'mat4x3',
@@ -321,10 +320,11 @@ def all_tests():
                       'uint', 'uvec2', 'uvec3', 'uvec4']:
         for array in [None, 2]:
             for patch_in in [True, False]:
-                    yield Test(type_name, array, patch_in, name=None)
+                yield Test(type_name, array, patch_in, name=None)
     for var in ['gl_Position', 'gl_PointSize', 'gl_ClipDistance']:
         yield Test(type_name=None, array=None, patch_in=False, name=var)
 
+
 def main():
     for test in all_tests():
         test.generate()
-- 
2.6.1



More information about the Piglit mailing list