[Zodb-checkins] CVS: Zope3/src/zope/interface/tests - test_declarations.py:1.1.4.2

Jim Fulton jim at zope.com
Sat May 3 12:35:48 EDT 2003


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

Modified Files:
      Tag: interfacegeddon2-branch
	test_declarations.py 
Log Message:
Fixed some incomplete tests.


=== Zope3/src/zope/interface/tests/test_declarations.py 1.1.4.1 => 1.1.4.2 ===
--- Zope3/src/zope/interface/tests/test_declarations.py:1.1.4.1	Fri May  2 15:42:54 2003
+++ Zope3/src/zope/interface/tests/test_declarations.py	Sat May  3 11:35:47 2003
@@ -37,6 +37,9 @@
 
 class COnly(A, B):
     implementsOnly(I3)
+
+class COnly_old(A, B):
+    __implements__ = I3
     
 class D(COnly):
     implements(I5)
@@ -60,29 +63,31 @@
                   A.__dict__['__implements__'].__signature__,
                   B.__dict__['__implements__'].__signature__,
                   )
+        self.assertEqual(sig, expect)
 
     def test_ObjectSpecification_Simple_w_only(self):
-        c = C()
+        c = COnly()
         directlyProvides(c, I4)
         spec = providedBy(c)
         sig = spec.__signature__
         expect = (c.__provides__.__signature__,
-                  C.__dict__['__implements__'].__signature__,
+                  COnly.__dict__['__implements__'].__signature__,
                   A.__dict__['__implements__'].__signature__,
                   B.__dict__['__implements__'].__signature__,
                   )
+        self.assertEqual(sig, expect)
 
-
-
-        c = COnly()
+    def test_ObjectSpecification_Simple_old_style(self):
+        c = COnly_old()
         directlyProvides(c, I4)
         spec = providedBy(c)
         sig = spec.__signature__
         expect = (c.__provides__.__signature__,
-                  COnly.__dict__['__implements__'].__signature__,
+                  COnly_old.__dict__['__implements__'].__signature__,
                   A.__dict__['__implements__'].__signature__,
                   B.__dict__['__implements__'].__signature__,
                   )
+        self.assertEqual(sig, expect)
 
     def test_backward_compat(self):
 




More information about the Zodb-checkins mailing list