[Zodb-checkins] CVS: Zope3/src/ZConfig/tests - test_loader.py:1.18

Fred L. Drake, Jr. fred at zope.com
Fri Oct 3 12:41:33 EDT 2003


Update of /cvs-repository/Zope3/src/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv3387

Modified Files:
	test_loader.py 
Log Message:
add test that a module can't provide a schema component (the point is
to make sure we control *what* exception is raised, not that *some*
exception is raised)


=== Zope3/src/ZConfig/tests/test_loader.py 1.17 => 1.18 ===
--- Zope3/src/ZConfig/tests/test_loader.py:1.17	Thu Sep 25 10:35:09 2003
+++ Zope3/src/ZConfig/tests/test_loader.py	Fri Oct  3 12:41:32 2003
@@ -73,6 +73,12 @@
                                    "  <import src='library.xml'"
                                    "          file='other.xml'/>"
                                    "</schema>"))
+        # cannot specify module as package
+        sio = StringIO("<schema>"
+                       "  <import package='ZConfig.tests.test_loader'/>"
+                       "</schema>")
+        self.assertRaises(ZConfig.SchemaError, ZConfig.loadSchemaFile,
+                          sio)
 
     def test_import_from_package(self):
         loader = ZConfig.loader.SchemaLoader()




More information about the Zodb-checkins mailing list