summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-07-06 17:22:48 (GMT)
committerFred Drake <fdrake@acm.org>2001-07-06 17:22:48 (GMT)
commitbeb6713ea700d28ea88c703f24c1ba6ba43230f8 (patch)
tree93990445ea49c8445ec05777803de58b06479479 /Lib/test
parent45c23e61d88c20aa6a63060654fce182927ef915 (diff)
downloadcpython-beb6713ea700d28ea88c703f24c1ba6ba43230f8.zip
cpython-beb6713ea700d28ea88c703f24c1ba6ba43230f8.tar.gz
cpython-beb6713ea700d28ea88c703f24c1ba6ba43230f8.tar.bz2
When reading a continuation line, make sure we still use the transformed
name when filling in the internal data structures, otherwise we incorrectly raise a KeyError. This fixes SF bug #432369.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_cfgparser.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_cfgparser.py b/Lib/test/test_cfgparser.py
index 62395a0..0d8f199 100644
--- a/Lib/test/test_cfgparser.py
+++ b/Lib/test/test_cfgparser.py
@@ -70,6 +70,13 @@ def case_sensitivity():
cf.remove_option("a", "B")
verify(cf.options("a") == [])
+ # SF bug #432369:
+ cf = ConfigParser.ConfigParser()
+ sio = StringIO.StringIO("[MySection]\nOption: first line\n\tsecond line\n")
+ cf.readfp(sio)
+ verify(cf.options("MySection") == ["option"])
+ verify(cf.get("MySection", "Option") == "first line\nsecond line")
+
def interpolation(src):
print "Testing value interpolation..."