[Zope3-checkins] CVS: Zope3/src/zope/app/component - interface.py:1.3

Jim Fulton jim at zope.com
Sun Apr 11 14:16:25 EDT 2004


Update of /cvs-repository/Zope3/src/zope/app/component
In directory cvs.zope.org:/tmp/cvs-serv19069/src/zope/app/component

Modified Files:
	interface.py 
Log Message:
getUtilitiesFor now returns an iteratable.

Fixed a test typo


=== Zope3/src/zope/app/component/interface.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/component/interface.py:1.2	Fri Mar  5 17:08:58 2004
+++ Zope3/src/zope/app/component/interface.py	Sun Apr 11 14:16:24 2004
@@ -20,7 +20,6 @@
 from zope.component import getService
 from zope.interface import directlyProvides
 from zope.interface.interfaces import IInterface
-from zope.component.utility import utilityService
 from types import ClassType
 from zope.app import zapi
 
@@ -40,14 +39,14 @@
     >>> IContentType.providedBy(I)
     False
     >>> interfaces = utilities.getUtilitiesFor(IContentType)
-    >>> interfaces
+    >>> list(interfaces)
     []
     >>> provideInterface('', I, IContentType)
     >>> IContentType.providedBy(I)
     True
-    >>> interfaces = utilities.getUtilitiesFor(IContentType)
+    >>> interfaces = list(utilities.getUtilitiesFor(IContentType))
     >>> [name for (name, iface) in interfaces]
-    ['zope.app.component.interface.I']
+    [u'zope.app.component.interface.I']
     >>> [iface.__name__ for (name, iface) in interfaces]
     ['I']
     >>> class I1(Interface):
@@ -57,9 +56,9 @@
     True
     >>> IContentType.providedBy(I1)
     False
-    >>> interfaces1 = utilities.getUtilitiesFor(IContentType)
+    >>> interfaces = list(utilities.getUtilitiesFor(IContentType))
     >>> [name for (name, iface) in interfaces]
-    ['zope.app.component.interface.I']
+    [u'zope.app.component.interface.I']
     >>> [iface.__name__ for (name, iface) in interfaces]
     ['I']
     >>> tearDown()
@@ -204,7 +203,7 @@
     >>> iface = searchInterfaceIds(None,
     ...                        'zope.app.component.interface.I5')
     >>> iface
-    ['zope.app.component.interface.I5']
+    [u'zope.app.component.interface.I5']
     >>> tearDown()
 
     """




More information about the Zope3-Checkins mailing list