[Zope3-checkins] CVS: Zope3/src/zope/app/tests - test_decorator.py:1.3

Jim Fulton cvs-admin at zope.org
Fri Nov 21 12:09:39 EST 2003


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

Modified Files:
	test_decorator.py 
Log Message:
Specifications (interfaces and declarations) no-longer have __signature__s.


=== Zope3/src/zope/app/tests/test_decorator.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/tests/test_decorator.py:1.2	Sun Sep 21 13:33:33 2003
+++ Zope3/src/zope/app/tests/test_decorator.py	Fri Nov 21 12:09:39 2003
@@ -65,101 +65,24 @@
     ['I4', 'I3', 'I1', 'I2']
     """
 
-def test_providedBy_signature_w_new_style_class():
-    """
-    >>> class X(object):
-    ...   implements(I3)
-
-    >>> x = X()
-
-    >>> int(providedBy(x).__signature__ == implementedBy(X).__signature__)
-    1
-
-    >>> int(providedBy(Decorator(x)).__signature__ ==
-    ...     implementedBy(X).__signature__)
-    1
-
-    >>> directlyProvides(x, I4)    
-    >>> int(providedBy(x).__signature__ ==
-    ...      (directlyProvidedBy(x).__signature__,
-    ...       implementedBy(X).__signature__,
-    ...      )
-    ...     )
-    1
-
-    >>> int(providedBy(D1(x)).__signature__ ==
-    ...      (
-    ...       (directlyProvidedBy(x).__signature__,
-    ...        implementedBy(X).__signature__,
-    ...       ),
-    ...       implementedBy(D1).__signature__,
-    ...      )
-    ...     )
-    1
-
-    >>> int(providedBy(D2(D1(x))).__signature__ ==
-    ...       (
-    ...        (
-    ...         (directlyProvidedBy(x).__signature__,
-    ...          implementedBy(X).__signature__,
-    ...         ),
-    ...         implementedBy(D1).__signature__,
-    ...        ),
-    ...        implementedBy(D2).__signature__,
-    ...       )
-    ...     )
-    1
-
-    """
-
-def test_providedBy_signature_w_classic_class():
+def test_providedBy_iter_w_classic_class():
     """
     >>> class X:
     ...   implements(I3)
 
     >>> x = X()
-
-
-    >>> int(providedBy(x).__signature__ == implementedBy(X).__signature__)
-    1
-
-    >>> int(providedBy(Decorator(x)).__signature__ ==
-    ...     implementedBy(X).__signature__)
-    1
-
     >>> directlyProvides(x, I4)
 
-    >>> int(providedBy(x).__signature__ ==
-    ...      (directlyProvidedBy(x).__signature__,
-    ...       implementedBy(X).__signature__,
-    ...      )
-    ...     )
-    1
+    >>> [interface.getName() for interface in list(providedBy(x))]
+    ['I4', 'I3']
 
-    >>> int(providedBy(D1(x)).__signature__ ==
-    ...      (
-    ...       (directlyProvidedBy(x).__signature__,
-    ...        implementedBy(X).__signature__,
-    ...       ),
-    ...       implementedBy(D1).__signature__,
-    ...      )
-    ...     )
-    1
-
-    >>> int(providedBy(D2(D1(x))).__signature__ ==
-    ...       (
-    ...        (
-    ...         (directlyProvidedBy(x).__signature__,
-    ...          implementedBy(X).__signature__,
-    ...         ),
-    ...         implementedBy(D1).__signature__,
-    ...        ),
-    ...        implementedBy(D2).__signature__,
-    ...       )
-    ...     )
-    1
+    >>> [interface.getName() for interface in list(providedBy(D1(x)))]
+    ['I4', 'I3', 'I1']
 
+    >>> [interface.getName() for interface in list(providedBy(D2(D1(x))))]
+    ['I4', 'I3', 'I1', 'I2']
     """
+
 
 class Thing:
     pass




More information about the Zope3-Checkins mailing list