[Piglit] [PATCH 01/34] gen_builtin_packing_tests.py: use __future__ division

Dylan Baker baker.dylan.c at gmail.com
Mon Feb 23 11:27:19 PST 2015


I think it is important that we import at least print_function and
division into all of the hybrid files, it prevents an accident where
someone uses one of them and it only works in one version of python. It
might be worth adding absolute_import as well for the same reason,
though I doubt anyone but me would end up doing anything where that
mattered.

On Sat, Feb 21, 2015 at 01:14:31AM -0800, Vinson Lee wrote:
> On Fri, Feb 20, 2015 at 6:17 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> > This produces no changes in the output
> >
> > Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> > ---
> >  generated_tests/gen_builtin_packing_tests.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/generated_tests/gen_builtin_packing_tests.py b/generated_tests/gen_builtin_packing_tests.py
> > index 901f493..2815fc3 100644
> > --- a/generated_tests/gen_builtin_packing_tests.py
> > +++ b/generated_tests/gen_builtin_packing_tests.py
> > @@ -32,7 +32,7 @@ denormalized) floating point numbers.
> >
> >  """
> >
> > -from __future__ import print_function
> > +from __future__ import print_function, division
> >  import math
> >  import optparse
> >  import os
> > --
> > 2.3.0
> >
> > _______________________________________________
> > Piglit mailing list
> > Piglit at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit
> 
> Is this import necessary? I didn't see any integer division in this file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150223/13ede334/attachment.sig>


More information about the Piglit mailing list