[Zope-Checkins] CVS: Packages/ZConfig/tests - test_schema.py:1.1.2.9

Fred L. Drake, Jr. fred@zope.com
Thu, 12 Dec 2002 14:26:47 -0500


Update of /cvs-repository/Packages/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv25615

Modified Files:
      Tag: zconfig-schema-devel-branch
	test_schema.py 
Log Message:
Add test of the empty section syntax; empty sections using the <.../>
syntax had been getting dropped.


=== Packages/ZConfig/tests/test_schema.py 1.1.2.8 => 1.1.2.9 ===
--- Packages/ZConfig/tests/test_schema.py:1.1.2.8	Thu Dec 12 13:11:20 2002
+++ Packages/ZConfig/tests/test_schema.py	Thu Dec 12 14:26:46 2002
@@ -120,6 +120,20 @@
         o2 = conf.conf.sect
         self.assert_(o1 is o2)
 
+    def test_empty_sections(self):
+        schema = self.load_schema_text(
+            "<schema>"
+            "  <sectiontype name='section'/>"
+            "  <section type='section' name='s1'/>"
+            "  <section type='section' name='s2'/>"
+            "</schema>")
+        conf = self.load_config_text(schema,
+                                     "<section s1>\n"
+                                     "</section>\n"
+                                     "<section s2/>")
+        self.assert_(conf.s1 is not None)
+        self.assert_(conf.s2 is not None)
+
     def test_multivalued_keys(self):
         schema = self.load_schema_text(
             "<schema>"