[Zope3-checkins] CVS: Zope3/src/zope/configuration/tests - test_xmlconfig.py:1.5

Marius Gedminas marius at pov.lt
Mon Mar 1 08:25:48 EST 2004


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

Modified Files:
	test_xmlconfig.py 
Log Message:
Detect ZCML files that are imported more than once and produce a brief and
clear error message about it.  Without this duplicate imports cause a (large)
number of conflict errors, and reading 1000+ line error messages is not fun for
the end user.



=== Zope3/src/zope/configuration/tests/test_xmlconfig.py 1.4 => 1.5 ===
--- Zope3/src/zope/configuration/tests/test_xmlconfig.py:1.4	Thu Jul 31 10:57:01 2003
+++ Zope3/src/zope/configuration/tests/test_xmlconfig.py	Mon Mar  1 08:25:48 2004
@@ -229,6 +229,15 @@
     >>> [clean_path(p) for p in data.includepath]
     ['tests/samplepackage/configure.zcml']
 
+    Including the same file more than once produces an error:
+
+    >>> try:
+    ...   xmlconfig.include(context, 'configure.zcml', package)
+    ... except xmlconfig.ConfigurationError, e:
+    ...   'OK'
+    ...
+    'OK'
+
     """
 
 def test_include_by_file():
@@ -473,6 +482,10 @@
     >>> print clean_info_path(`data.info`)
     File "tests/samplepackage/bar2.zcml", line 6.2-6.24
     
+    Finally, clean up.
+
+    >>> from zope.testing.cleanup import CleanUp
+    >>> CleanUp().cleanUp()
     """
 
 def test_XMLConfig_w_module():
@@ -513,6 +526,10 @@
     >>> print clean_info_path(`data.info`)
     File "tests/samplepackage/bar2.zcml", line 6.2-6.24
     
+    Finally, clean up.
+
+    >>> from zope.testing.cleanup import CleanUp
+    >>> CleanUp().cleanUp()
     """
     
 




More information about the Zope3-Checkins mailing list