[Piglit] [PATCH 02/20] framework: Convert the ConfigParser import to lowercase.

Jon Severinsson jon at severinsson.net
Wed Apr 17 09:14:41 PDT 2013


This matches the Python 3.x name.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 framework/glsl_parser_test.py |   11 +++++------
 1 fil ändrad, 5 tillägg(+), 6 borttagningar(-)

diff --git a/framework/glsl_parser_test.py b/framework/glsl_parser_test.py
index 9385dab..9b081ef 100755
--- a/framework/glsl_parser_test.py
+++ b/framework/glsl_parser_test.py
@@ -34,13 +34,12 @@ usage_message = "usage: glsl_parser_test.py TEST_FILE"
 from .core import Test, testBinDir, TestResult
 from .exectest import PlainExecTest
 
-import ConfigParser
+import ConfigParser as configparser
 import os
 import os.path as path
 import re
 import subprocess
 import sys
-from ConfigParser import SafeConfigParser
 from cStringIO import StringIO
 
 def add_glsl_parser_test(group, filepath, test_name):
@@ -108,14 +107,14 @@ class GLSLParserTest(PlainExecTest):
 	comments. This section can appear anywhere in the file: above,
 	within, or below the actual GLSL source code. The syntax of the config
 	section is essentially the syntax of
-	``ConfigParser.SafeConfigParser``.
+	``configparser.SafeConfigParser``.
 
 	The beginning of the config section is marked by a comment line that
 	contains only '[config]'. The end of the config section is marked by
 	a comment line that contains only '[end config]'. All intervening
 	lines become the text of the config section.
 
-	Whitespace is significant, because ``ConfigParser`` treats it so.  The
+	Whitespace is significant, because ``configparser`` treats it so.  The
 	config text of each non-empty line begins on the same column as the
 	``[`` in the ``[config]`` line.  (A line is considered empty if it
 	contains whitespace and an optional C comment marker: ``//``, ``*``,
@@ -293,12 +292,12 @@ class GLSLParserTest(PlainExecTest):
 		else:
 			assert(False)
 
-		config = ConfigParser.SafeConfigParser(cls.__config_defaults)
+		config = configparser.SafeConfigParser(cls.__config_defaults)
 		try:
 			text = text_io.getvalue()
 			text_io.close()
 			config.readfp(StringIO(text))
-		except ConfigParser.Error as e:
+		except configparser.Error as e:
 			self.result = TestResult()
 			self.result['result'] = 'fail'
 			self.result['errors'] = ['Errors exist in config section of test file']
-- 
1.7.10.4



More information about the Piglit mailing list