From: Dylan Baker <[email protected]> Fixes the following warnings from pylint: - constants should be ALL_CAPS - shadowing names from the outer scope
Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Vinson Lee <[email protected]> --- tests/oglconform.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/oglconform.py b/tests/oglconform.py index ca3b49f..710c406 100644 --- a/tests/oglconform.py +++ b/tests/oglconform.py @@ -31,12 +31,11 @@ from framework.profile import TestProfile, Test __all__ = ['profile'] -bin_oglconform = core.PIGLIT_CONFIG.required_get('oglconform', 'path') +BIN = core.PIGLIT_CONFIG.required_get('oglconform', 'path') -if not os.path.exists(bin_oglconform): +if not os.path.exists(BIN): raise exceptions.PiglitFatalError( - 'Cannot find binary {}'.format(bin_oglconform)) - + 'Cannot find binary {}'.format(BIN)) class OGLCTest(Test): @@ -55,7 +54,7 @@ class OGLCTest(Test): @Test.command.getter def command(self): - return [bin_oglconform, '-minFmt', '-v', '4', '-test'] + \ + return [BIN, '-minFmt', '-v', '4', '-test'] + \ super(OGLCTest, self).command def interpret_result(self): @@ -68,11 +67,12 @@ class OGLCTest(Test): def _make_profile(): - profile = TestProfile() + """Create and populate a TestProfile instance.""" + profile_ = TestProfile() with tempfile.NamedTemporaryFile() as f: with open(os.devnull, "w") as devnull: - subprocess.call([bin_oglconform, '-generateTestList', f.name], + subprocess.call([BIN, '-generateTestList', f.name], stdout=devnull.fileno(), stderr=devnull.fileno()) f.seek(0) @@ -84,9 +84,9 @@ def _make_profile(): continue group = grouptools.join('oglconform', category, test) - profile.test_list[group] = OGLCTest(category, test) + profile_.test_list[group] = OGLCTest(category, test) - return profile + return profile_ profile = _make_profile() # pylint: disable=invalid-name -- 2.6.2 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
