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

Fred L. Drake, Jr. fred@zope.com
Tue, 31 Dec 2002 17:07:06 -0500


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

Modified Files:
      Tag: zconfig-schema-devel-branch
	test_schema.py 
Log Message:
Add a test that values accessed both by name and index are kept in
sync if the values are modified.


=== Packages/ZConfig/tests/test_schema.py 1.1.2.33 => 1.1.2.34 ===
--- Packages/ZConfig/tests/test_schema.py:1.1.2.33	Tue Dec 24 15:49:19 2002
+++ Packages/ZConfig/tests/test_schema.py	Tue Dec 31 17:07:05 2002
@@ -415,6 +415,13 @@
             "</schema>")
         self.assertEqual(schema.getunusedtypes(), ["unused"])
 
+    def test_section_value_mutation(self):
+        schema, conf = self.load_both("simple.xml", "simple.conf")
+        orig = conf.empty
+        new = []
+        conf.empty = new
+        self.assert_(conf[0] is new)
+
 
 def test_suite():
     return unittest.makeSuite(SchemaTestCase)