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


On Mon, Mar 16, 2015 at 2:30 PM, Dylan Baker <[email protected]> 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 <[email protected]>
>> ---
>>  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
>> [email protected]
>> http://lists.freedesktop.org/mailman/listinfo/piglit
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to