#5741: dont disallow double percent signs in SafeConfigParser.set() keys.

This commit is contained in:
Georg Brandl 2009-04-12 17:24:11 +00:00
parent 3295eed64b
commit 21cf5ee6fd
3 changed files with 11 additions and 4 deletions

View file

@ -434,6 +434,10 @@ class SafeConfigParserTestCase(ConfigParserTestCase):
self.assertEqual(cf.get('sect', "option1"), "foo")
# bug #5741: double percents are *not* malformed
cf.set("sect", "option2", "foo%%bar")
self.assertEqual(cf.get("sect", "option2"), "foo%bar")
def test_set_nonstring_types(self):
cf = self.fromstring("[sect]\n"
"option1=foo\n")