[Piglit] [PATCH 11/12] gen_dispatch.py: Remove unnecessary parens from assert keyword

Vinson Lee vlee at freedesktop.org
Fri Jan 16 21:49:55 PST 2015


On Tue, Jan 13, 2015 at 5:48 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
> ---
>  tests/util/gen_dispatch.py | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tests/util/gen_dispatch.py b/tests/util/gen_dispatch.py
> index 6bfd6c0..34f3704 100644
> --- a/tests/util/gen_dispatch.py
> +++ b/tests/util/gen_dispatch.py
> @@ -81,18 +81,18 @@ class DispatchCode(object):
>      }
>      APIS['glcore'] = APIS['gl']
>
> -    assert(set(APIS.keys()) == set(registry.gl.VALID_APIS))
> +    assert set(APIS.keys()) == set(registry.gl.VALID_APIS)
>
>      @classmethod
>      def emit(cls, out_dir, gl_registry):
> -        assert(isinstance(gl_registry, registry.gl.Registry))
> +        assert isinstance(gl_registry, registry.gl.Registry)
>          context_vars = dict(dispatch=cls, gl_registry=gl_registry)
>          render_template(cls.H_TEMPLATE, out_dir, **context_vars)
>          render_template(cls.C_TEMPLATE, out_dir, **context_vars)
>
>
>  def render_template(filename, out_dir, **context_vars):
> -    assert(filename.endswith('.mako'))
> +    assert filename.endswith('.mako')
>      template_filepath = os.path.join(os.path.dirname(__file__), filename)
>      out_filepath = os.path.join(out_dir, os.path.splitext(filename)[0])
>
> @@ -130,7 +130,7 @@ class EnumCode(object):
>
>      @classmethod
>      def emit(cls, out_dir, gl_registry):
> -        assert(isinstance(gl_registry, registry.gl.Registry))
> +        assert isinstance(gl_registry, registry.gl.Registry)
>          enums = cls.get_unique_enums_in_default_namespace(gl_registry)
>          render_template(
>              cls.C_TEMPLATE,
> --
> 2.2.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


Reviewed-by: Vinson Lee <vlee at freedesktop.org>


More information about the Piglit mailing list