[Zope3-checkins] CVS: Zope3/src/zope/interface/tests - test_interface.py:1.5

Jim Fulton jim@zope.com
Sat, 3 May 2003 12:36:36 -0400


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

Modified Files:
	test_interface.py 
Log Message:
Updated to use new interface declaration machinery.



=== Zope3/src/zope/interface/tests/test_interface.py 1.4 => 1.5 ===
--- Zope3/src/zope/interface/tests/test_interface.py:1.4	Thu May  1 15:35:44 2003
+++ Zope3/src/zope/interface/tests/test_interface.py	Sat May  3 12:36:05 2003
@@ -15,8 +15,8 @@
 import unittest
 from zope.interface.tests.unitfixtures import *  # hehehe
 from zope.interface.exceptions import BrokenImplementation
-from zope.interface.implements import instancesOfObjectImplements
-from zope.interface.implements import objectImplements
+from zope.interface import implementedBy
+from zope.interface import providedBy
 from zope.interface import Interface
 from zope.interface.interface import Attribute
 
@@ -40,18 +40,21 @@
         assert not I2.isImplementedByInstancesOf(A)
         assert I2.isImplementedByInstancesOf(B)
         assert not I2.isImplementedByInstancesOf(C)
-        assert not I2.isImplementedByInstancesOf(D)
+
+        # No longer after interfacegeddon
+        # assert not I2.isImplementedByInstancesOf(D)
+
         assert not I2.isImplementedByInstancesOf(E)
 
     def testUtil(self):
-        f = instancesOfObjectImplements
+        f = implementedBy
         assert IC in f(C)
         assert I1 in f(A)
         assert not I1 in f(C)
         assert I2 in f(B)
         assert not I2 in f(C)
 
-        f = objectImplements
+        f = providedBy
         assert IC in f(C())
         assert I1 in f(A())
         assert not I1 in f(C())
@@ -71,7 +74,10 @@
         assert not I2.isImplementedBy(A())
         assert I2.isImplementedBy(B())
         assert not I2.isImplementedBy(C())
-        assert not I2.isImplementedBy(D())
+
+        # Not after interface geddon
+        # assert not I2.isImplementedBy(D())
+
         assert not I2.isImplementedBy(E())
 
     def testDeferredClass(self):