[Checkins] SVN: zope.component/tseaver-test_cleanup/ Flesh out ZCML configuration docs.

Tres Seaver cvs-admin at zope.org
Sun Jun 17 18:32:05 UTC 2012


Log message for revision 126893:
  Flesh out ZCML configuration docs.

Changed:
  _U  zope.component/tseaver-test_cleanup/
  U   zope.component/tseaver-test_cleanup/docs/configure.rst

-=-
Modified: zope.component/tseaver-test_cleanup/docs/configure.rst
===================================================================
--- zope.component/tseaver-test_cleanup/docs/configure.rst	2012-06-17 18:31:57 UTC (rev 126892)
+++ zope.component/tseaver-test_cleanup/docs/configure.rst	2012-06-17 18:32:01 UTC (rev 126893)
@@ -2,12 +2,29 @@
 =====================
 
 The ``zope.component`` package provides a ZCML file that configures some basic
-components:
+event handlers.
 
-  >>> from zope.configuration.xmlconfig import XMLConfig
-  >>> import zope.component
+.. doctest::
 
-  >>> XMLConfig('configure.zcml', zope.component)()
+   >>> from zope.configuration.xmlconfig import XMLConfig
+   >>> import zope.component
+   >>> from zope.component import event
+   >>> from zope.component import registry
 
-  >>> len(list(zope.component.getGlobalSiteManager().registeredHandlers()))
-  5
+   >>> XMLConfig('configure.zcml', zope.component)()
+
+   >>> gsm = zope.component.getGlobalSiteManager()
+   >>> registered = list(gsm.registeredHandlers())
+   >>> len(registered)
+   5
+   >>> handlers = [x.handler for x in registered]
+   >>> event.objectEventNotify in handlers
+   True
+   >>> registry.dispatchUtilityRegistrationEvent in handlers
+   True
+   >>> registry.dispatchAdapterRegistrationEvent in handlers
+   True
+   >>> registry.dispatchSubscriptionAdapterRegistrationEvent in handlers
+   True
+   >>> registry.dispatchHandlerRegistrationEvent in handlers
+   True



More information about the checkins mailing list