[Zope3-checkins] CVS: Zope3/src/zope/app/adapter - tests.py:1.6

Jim Fulton jim at zope.com
Thu Apr 8 10:41:47 EDT 2004


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

Modified Files:
	tests.py 
Log Message:
Changed tests so that registration objects no-longer need to be
orderable, allowing us to get rid of __cmp__, which was only needed
for testing.


=== Zope3/src/zope/app/adapter/tests.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/adapter/tests.py:1.5	Wed Apr  7 15:18:57 2004
+++ Zope3/src/zope/app/adapter/tests.py	Thu Apr  8 10:41:17 2004
@@ -130,7 +130,7 @@
 
    We can ask for all of the registrations locally:
 
-   >>> registrations = list(L1.registrations())
+   >>> registrations = map(repr, L1.registrations())
    >>> registrations.sort()
    >>> for registration in registrations:
    ...     print registration
@@ -141,7 +141,7 @@
 
    If we ask L2, we'll see the registrations from G, L1, and L2:
    
-   >>> registrations = list(L2.registrations())
+   >>> registrations = map(repr, L2.registrations())
    >>> registrations.sort()
    >>> for registration in registrations:
    ...     print registration
@@ -771,12 +771,6 @@
             tuple([i.__name__ for i in self.with]),
             self.provided.__name__, self.name, self.factory
             )
-
-    def __cmp__(self, other):
-        if self.__class__ != other.__class__:
-            return cmp(repr(self.__class__), repr(other.__class__))
-
-        return cmp(repr(self), repr(other))
     
 
     def factories(self):




More information about the Zope3-Checkins mailing list