[Piglit] [PATCH] oglconform.py: Fix PEP 8 issues.
Dylan Baker
baker.dylan.c at gmail.com
Mon Mar 9 17:34:19 PDT 2015
On Mon, Mar 09, 2015 at 02:23:25PM -0700, Vinson Lee wrote:
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> tests/oglconform.py | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/tests/oglconform.py b/tests/oglconform.py
> index 436247c..6901a5a 100644
> --- a/tests/oglconform.py
> +++ b/tests/oglconform.py
> @@ -39,14 +39,17 @@ if not os.path.exists(bin_oglconform):
>
> profile = TestProfile()
>
> +
> #############################################################################
> -##### OGLCTest: Execute a sub-test of the Intel oglconform test suite.
> -#####
> -##### To use this, create an 'oglconform' symlink in piglit/bin. Piglit
> -##### will obtain a list of tests from oglconform and add them all.
> +# OGLCTest: Execute a sub-test of the Intel oglconform test suite.
> +#
> +# To use this, create an 'oglconform' symlink in piglit/bin. Piglit
> +# will obtain a list of tests from oglconform and add them all.
> #############################################################################
While you're make cosmetic changes could you pull this into a docstring?
> class OGLCTest(Test):
> - skip_re = re.compile(r'Total Not run: 1|no test in schedule is compat|GLSL [13].[345]0 is not supported|wont be scheduled due to lack of compatible fbconfig')
> + skip_re = re.compile(r'Total Not run: 1|no test in schedule is '
> + 'compat|GLSL [13].[345]0 is not supported|wont be '
> + 'scheduled due to lack of compatible fbconfig')
These all need the 'r' prefix
>
> def __init__(self, category, subtest):
> super(OGLCTest, self).__init__([bin_oglconform, '-minFmt', '-v', '4',
> @@ -65,13 +68,15 @@ class OGLCTest(Test):
> testlist_file = '/tmp/oglc.tests'
>
> with open(os.devnull, "w") as devnull:
> - subprocess.call([bin_oglconform, '-generateTestList', testlist_file], stdout=devnull.fileno(), stderr=devnull.fileno())
> + subprocess.call([bin_oglconform, '-generateTestList', testlist_file],
> + stdout=devnull.fileno(), stderr=devnull.fileno())
>
> with open(testlist_file) as f:
> testlist = f.read().splitlines()
> for l in testlist:
> try:
> category, test = l.split()
> - profile.test_list[grouptools.join('oglconform', category, test)] = OGLCTest(category, test)
> + profile.test_list[grouptools.join('oglconform', category, test)] \
> + = OGLCTest(category, test)
It looks like it's valid to put the = on the prfile.test_list line, IMHO
that's much more readable than being on the continued line.
> except:
> continue
> --
> 2.1.0
>
> _______________________________________________
> 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/20150309/43ed45a2/attachment.sig>
More information about the Piglit
mailing list