mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
#5741: dont disallow double percent signs in SafeConfigParser.set() keys.
This commit is contained in:
parent
3295eed64b
commit
21cf5ee6fd
3 changed files with 11 additions and 4 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue