summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-12 17:24:11 (GMT)
committerGeorg Brandl <georg@python.org>2009-04-12 17:24:11 (GMT)
commit21cf5ee6fdb190393d27b03f6b3c5453d97859df (patch)
tree2a6e224bb253d75c3e60e6e3da69325fc8947acf /Lib/test
parent3295eed64b8d43d9dc090c169942192c8d1b781b (diff)
downloadcpython-21cf5ee6fdb190393d27b03f6b3c5453d97859df.zip
cpython-21cf5ee6fdb190393d27b03f6b3c5453d97859df.tar.gz
cpython-21cf5ee6fdb190393d27b03f6b3c5453d97859df.tar.bz2
#5741: dont disallow double percent signs in SafeConfigParser.set() keys.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_cfgparser.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_cfgparser.py b/Lib/test/test_cfgparser.py
index 600d2dc..a0d8051 100644
--- a/Lib/test/test_cfgparser.py
+++ b/Lib/test/test_cfgparser.py
@@ -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")