[Python-checkins] python/dist/src/Lib/test test_cfgparser.py, 1.23,
1.24
goodger at users.sourceforge.net
goodger at users.sourceforge.net
Sun Oct 3 17:40:27 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20319/Lib/test
Modified Files:
test_cfgparser.py
Log Message:
SF bug #1017864: ConfigParser now correctly handles default keys, processing them with ``ConfigParser.optionxform`` when supplied, consistent with the handling of config file entries and runtime-set options.
Index: test_cfgparser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_cfgparser.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- test_cfgparser.py 18 May 2004 04:24:02 -0000 1.23
+++ test_cfgparser.py 3 Oct 2004 15:40:25 -0000 1.24
@@ -115,6 +115,16 @@
self.failUnless(cf.has_option("section", "Key"))
+ def test_default_case_sensitivity(self):
+ cf = self.newconfig({"foo": "Bar"})
+ self.assertEqual(
+ cf.get("DEFAULT", "Foo"), "Bar",
+ "could not locate option, expecting case-insensitive option names")
+ cf = self.newconfig({"Foo": "Bar"})
+ self.assertEqual(
+ cf.get("DEFAULT", "Foo"), "Bar",
+ "could not locate option, expecting case-insensitive defaults")
+
def test_parse_errors(self):
self.newconfig()
self.parse_error(ConfigParser.ParsingError,
More information about the Python-checkins
mailing list