[Piglit] [Patch v2 4/4] gen_const_builtin_equal_tests.py: cleanup a few pylint errors

Ilia Mirkin imirkin at alum.mit.edu
Mon May 19 17:50:17 PDT 2014


Series is

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

Thanks for bearing with my nitpicks :)

On Mon, May 19, 2014 at 8:42 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> v2: - fix one additional pylint warning for long lines
>     - reformat the TEST_VECTORS list to have better whitespace between
>       the groups.
>
> Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
> ---
>  generated_tests/gen_const_builtin_equal_tests.py | 90 +++++++++++-------------
>  1 file changed, 41 insertions(+), 49 deletions(-)
>
> diff --git a/generated_tests/gen_const_builtin_equal_tests.py b/generated_tests/gen_const_builtin_equal_tests.py
> index 115ecb1..ed0b006 100644
> --- a/generated_tests/gen_const_builtin_equal_tests.py
> +++ b/generated_tests/gen_const_builtin_equal_tests.py
> @@ -48,53 +48,44 @@ TEMPLATE = mako.template.Template(textwrap.dedent("""
>      draw rect -1 -1 2 2
>      probe all rgb 0.0 1.0 0.0"""))
>
> -test_vectors = [
> -    [
> -        "vec2(3.0, 3.14)",
> -        "vec2(-6.0, 7.88)",
> -        "bvec2(false, false)"
> -        ],
> -    [
> -        "vec3(13.4, -0.9, 12.55)",
> -        "vec3(13.4, 12.0, -55.3)",
> -        "bvec3(true, false, false)"
> -        ],
> -    [
> -        "vec4(-2.0, 0.0, 0.123, -1000.5)",
> -        "vec4(-2.4, 0.0, 0.456, 12.5)",
> -        "bvec4(false, true, false, false)"
> -        ],
> -    [
> -        "ivec2(-8, 12)",
> -        "ivec2(-19, 12)",
> -        "bvec2(false, true)"
> -        ],
> -    [
> -        "ivec3(0, 8, 89)",
> -        "ivec3(4, -7, 33)",
> -        "bvec3(false, false, false)"
> -        ],
> -    [
> -        "ivec4(11, 1000, 1, -18)",
> -        "ivec4(55, 1000, -21, -17)",
> -        "bvec4(false, true, false, false)"
> -        ],
> -    [
> -        "bvec2(true, false)",
> -        "bvec2(true, true)",
> -        "bvec2(true, false)"
> -        ],
> -    [
> -        "bvec3(false, true, false)",
> -        "bvec3(false, false, true)",
> -        "bvec3(true, false, false)"
> -        ],
> -    [
> -        "bvec4(true, false, false, true)",
> -        "bvec4(true, true, false, false)",
> -        "bvec4(true, false, true, false)"
> -        ]
> -    ]
> +TEST_VECTORS = [
> +    ["vec2(3.0, 3.14)",
> +     "vec2(-6.0, 7.88)",
> +     "bvec2(false, false)"
> +    ],
> +    ["vec3(13.4, -0.9, 12.55)",
> +     "vec3(13.4, 12.0, -55.3)",
> +     "bvec3(true, false, false)"
> +    ],
> +    ["vec4(-2.0, 0.0, 0.123, -1000.5)",
> +     "vec4(-2.4, 0.0, 0.456, 12.5)",
> +     "bvec4(false, true, false, false)"
> +    ],
> +    ["ivec2(-8, 12)",
> +     "ivec2(-19, 12)",
> +     "bvec2(false, true)"
> +    ],
> +    ["ivec3(0, 8, 89)",
> +     "ivec3(4, -7, 33)",
> +     "bvec3(false, false, false)"
> +    ],
> +    ["ivec4(11, 1000, 1, -18)",
> +     "ivec4(55, 1000, -21, -17)",
> +     "bvec4(false, true, false, false)"
> +    ],
> +    ["bvec2(true, false)",
> +     "bvec2(true, true)",
> +     "bvec2(true, false)"
> +    ],
> +    ["bvec3(false, true, false)",
> +     "bvec3(false, false, true)",
> +     "bvec3(true, false, false)"
> +    ],
> +    ["bvec4(true, false, false, true)",
> +     "bvec4(true, true, false, false)",
> +     "bvec4(true, false, true, false)"
> +    ],
> +]
>
>
>  def main():
> @@ -104,7 +95,7 @@ def main():
>      except OSError:
>          pass
>
> -    for test_id, x in enumerate(test_vectors, start=2):
> +    for test_id, x in enumerate(TEST_VECTORS, start=2):
>          # make equal tests
>          name = ("spec/glsl-1.20/execution/built-in-functions/"
>                  "glsl-const-builtin-equal-{0:02d}.shader_test".format(test_id))
> @@ -116,7 +107,8 @@ def main():
>
>          # make notEqual tests
>          name = ("spec/glsl-1.20/execution/built-in-functions/"
> -                "glsl-const-builtin-notEqual-{0:02d}.shader_test".format(test_id))
> +                "glsl-const-builtin-notEqual-{0:02d}.shader_test".format(
> +                    test_id))
>
>          # When generating the notEqual tests, each of the values in the
>          # expected result vector need to be inverted
> --
> 2.0.0.rc2
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list