[Checkins] SVN: zope.i18n/trunk/src/zope/i18n/ Include meta.zcml files in our own zcml configuration as needed,
Thomas Lotze
tl at gocept.com
Sun Sep 19 05:02:34 EDT 2010
Log message for revision 116621:
Include meta.zcml files in our own zcml configuration as needed,
added a test for our configure.zcml.
Changed:
U zope.i18n/trunk/src/zope/i18n/configure.zcml
U zope.i18n/trunk/src/zope/i18n/locales/configure.zcml
A zope.i18n/trunk/src/zope/i18n/tests/configure.txt
U zope.i18n/trunk/src/zope/i18n/tests/test_zcml.py
-=-
Modified: zope.i18n/trunk/src/zope/i18n/configure.zcml
===================================================================
--- zope.i18n/trunk/src/zope/i18n/configure.zcml 2010-09-19 08:49:46 UTC (rev 116620)
+++ zope.i18n/trunk/src/zope/i18n/configure.zcml 2010-09-19 09:02:33 UTC (rev 116621)
@@ -1,5 +1,7 @@
<configure xmlns="http://namespaces.zope.org/zope">
+ <include file="meta.zcml" package="zope.component" />
+
<utility
provides="zope.i18n.interfaces.INegotiator"
component="zope.i18n.negotiator.negotiator"
Modified: zope.i18n/trunk/src/zope/i18n/locales/configure.zcml
===================================================================
--- zope.i18n/trunk/src/zope/i18n/locales/configure.zcml 2010-09-19 08:49:46 UTC (rev 116620)
+++ zope.i18n/trunk/src/zope/i18n/locales/configure.zcml 2010-09-19 09:02:33 UTC (rev 116621)
@@ -1,6 +1,8 @@
<configure
xmlns="http://namespaces.zope.org/zope">
+ <include file="meta.zcml" package="zope.security" />
+
<class class="zope.i18n.format.NumberFormat">
<allow interface="zope.i18n.interfaces.INumberFormat" />
</class>
@@ -54,4 +56,4 @@
<allow interface="zope.i18n.interfaces.locales.ILocale" />
</class>
-</configure>
\ No newline at end of file
+</configure>
Added: zope.i18n/trunk/src/zope/i18n/tests/configure.txt
===================================================================
--- zope.i18n/trunk/src/zope/i18n/tests/configure.txt (rev 0)
+++ zope.i18n/trunk/src/zope/i18n/tests/configure.txt 2010-09-19 09:02:33 UTC (rev 116621)
@@ -0,0 +1,18 @@
+Package configuration
+=====================
+
+The ``zope.i18n`` package provides a ZCML file that configures a utility and
+some security:
+
+ >>> from zope.configuration.xmlconfig import XMLConfig
+ >>> import zope.i18n
+
+ >>> XMLConfig('configure.zcml', zope.i18n.locales)()
+
+ >>> len(list(zope.component.getGlobalSiteManager().registeredUtilities()))
+ 13
+
+ >>> XMLConfig('configure.zcml', zope.i18n)()
+
+ >>> len(list(zope.component.getGlobalSiteManager().registeredUtilities()))
+ 15
Property changes on: zope.i18n/trunk/src/zope/i18n/tests/configure.txt
___________________________________________________________________
Added: svn:keywords
+ Id Rev Date
Added: svn:eol-style
+ native
Modified: zope.i18n/trunk/src/zope/i18n/tests/test_zcml.py
===================================================================
--- zope.i18n/trunk/src/zope/i18n/tests/test_zcml.py 2010-09-19 08:49:46 UTC (rev 116620)
+++ zope.i18n/trunk/src/zope/i18n/tests/test_zcml.py 2010-09-19 09:02:33 UTC (rev 116621)
@@ -13,6 +13,7 @@
##############################################################################
"""Test the gts ZCML namespace directives.
"""
+import doctest
import os
import shutil
import stat
@@ -154,4 +155,7 @@
def test_suite():
- return unittest.makeSuite(DirectivesTest)
+ return unittest.TestSuite((
+ unittest.makeSuite(DirectivesTest),
+ doctest.DocFileSuite('configure.txt'),
+ ))
More information about the checkins
mailing list