[Python-checkins] CVS: python/dist/src/Lib/test test_cfgparser.py,1.7,1.7.4.1

Fred L. Drake fdrake@users.sourceforge.net
2001年7月06日 10:23:24 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv7784/Lib/test
Modified Files:
 Tag: release21-maint
	test_cfgparser.py 
Log Message:
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.
Index: test_cfgparser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_cfgparser.py,v
retrieving revision 1.7
retrieving revision 1.7.4.1
diff -C2 -r1.7 -r1.7.4.1
*** test_cfgparser.py	2001年02月26日 21:55:34	1.7
--- test_cfgparser.py	2001年07月06日 17:23:22	1.7.4.1
***************
*** 71,74 ****
--- 71,81 ----
 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):

AltStyle によって変換されたページ (->オリジナル) /