[Piglit] [PATCH 1/6] framework: Convert the ConfigParser import to lowercase.
Kenneth Graunke
kenneth at whitecape.org
Wed Apr 17 02:53:53 PDT 2013
From: Jon Severinsson <jon at severinsson.net>
This matches the Python 3.x name.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
framework/glsl_parser_test.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/framework/glsl_parser_test.py b/framework/glsl_parser_test.py
index 66e6dd3..4f84ef8 100755
--- a/framework/glsl_parser_test.py
+++ b/framework/glsl_parser_test.py
@@ -31,14 +31,13 @@ standalone tests on the command line. To add a test to a Piglit group, us
usage_message = "usage: glsl_parser_test.py TEST_FILE"
-import ConfigParser
+import ConfigParser as configparser
import os
import os.path as path
import re
import subprocess
import sys
-from ConfigParser import SafeConfigParser
from core import Test, testBinDir, TestResult
from cStringIO import StringIO
from exectest import PlainExecTest
@@ -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.8.2.1
More information about the Piglit
mailing list