diff options
author | David Goodger <goodger@python.org> | 2004-10-03 15:40:25 (GMT) |
---|---|---|
committer | David Goodger <goodger@python.org> | 2004-10-03 15:40:25 (GMT) |
commit | 68a1abdadec2377fd3e8d2211cb3cc119de77a28 (patch) | |
tree | 93db094b5487a4e8999c894c3ce7ba950bea97a3 /Lib/test/test_cfgparser.py | |
parent | bfe56843084c0ccb7f26e5225b1c22d767d90eb8 (diff) | |
download | cpython-68a1abdadec2377fd3e8d2211cb3cc119de77a28.zip cpython-68a1abdadec2377fd3e8d2211cb3cc119de77a28.tar.gz cpython-68a1abdadec2377fd3e8d2211cb3cc119de77a28.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_cfgparser.py')
-rw-r--r-- | Lib/test/test_cfgparser.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_cfgparser.py b/Lib/test/test_cfgparser.py index c799c7d..6b3e68a 100644 --- a/Lib/test/test_cfgparser.py +++ b/Lib/test/test_cfgparser.py @@ -115,6 +115,16 @@ class TestCaseBase(unittest.TestCase): 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, |