[Piglit] [PATCH] backends_tests.py: Fix PEP 8 issues.

Dylan Baker baker.dylan.c at gmail.com
Tue Mar 17 10:24:02 PDT 2015


On Mon, Mar 16, 2015 at 10:21:02PM -0700, Vinson Lee wrote:
> See https://www.python.org/dev/peps/pep-0008/#programming-recommendations.
> 
> $ pep8 framework/tests/backends_tests.py
> framework/tests/backends_tests.py:76:5: E731 do not assign a lambda
> expression, use a def

Ehh, I don't know how much I care, it's just a unit test.

Either way it's fine.
Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>

> 
> 
> On Mon, Mar 16, 2015 at 2:30 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> > What is the tool complaining about here?
> >
> > On Sat, Mar 14, 2015 at 01:30:14AM -0700, Vinson Lee wrote:
> >> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> >> ---
> >>  framework/tests/backends_tests.py | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/framework/tests/backends_tests.py b/framework/tests/backends_tests.py
> >> index b43302a..b3fbeac 100644
> >> --- a/framework/tests/backends_tests.py
> >> +++ b/framework/tests/backends_tests.py
> >> @@ -73,7 +73,8 @@ def test_get_backend():
> >>          'junit': backends.JUnitBackend,
> >>      }
> >>
> >> -    check = lambda n, i: nt.assert_is(backends.get_backend(n), i)
> >> +    def check(n, i):
> >> +        return nt.assert_is(backends.get_backend(n), i)
> >>
> >>      for name, inst in backends_.iteritems():
> >>          check.description = 'get_backend({0}) returns {0} backend'.format(name)
> >> --
> >> 2.3.2
> >>
> >> _______________________________________________
> >> Piglit mailing list
> >> Piglit at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- 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/20150317/8309dbe4/attachment.sig>


More information about the Piglit mailing list