]> granicus.if.org Git - python/commitdiff
Added regression test for SF bug #561822: has_option() case sensitive.
authorFred Drake <fdrake@acm.org>
Fri, 27 Sep 2002 15:35:23 +0000 (15:35 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 27 Sep 2002 15:35:23 +0000 (15:35 +0000)
Lib/test/test_cfgparser.py

index fae8a1788ce47762daa1eed3ca0c6af8c89bdbd7..17f5ea68d4a12f8a64e1047002d10891b00cb502 100644 (file)
@@ -97,6 +97,11 @@ def case_sensitivity():
     verify(cf.options("MySection") == ["option"])
     verify(cf.get("MySection", "Option") == "first line\nsecond line")
 
+    # SF bug #561822:
+    cf = ConfigParser.ConfigParser(defaults={"key":"value"})
+    cf.readfp(StringIO.StringIO("[section]\nnekey=nevalue\n"))
+    verify(cf.has_option("section", "Key"))
+
 
 def boolean(src):
     print "Testing interpretation of boolean Values..."