[Zope3-checkins] CVS: Zope3/src/zope/schema/tests - test_accessors.py:1.4

Gary Poster gary at zope.com
Tue Jan 20 14:45:09 EST 2004


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

Modified Files:
	test_accessors.py 
Log Message:
Fix get accessor so that it implements both the field declaration and its own declaration (including IMethod).  Small tests.




=== Zope3/src/zope/schema/tests/test_accessors.py 1.3 => 1.4 ===
--- Zope3/src/zope/schema/tests/test_accessors.py:1.3	Wed Jun  4 05:09:46 2003
+++ Zope3/src/zope/schema/tests/test_accessors.py	Tue Jan 20 14:45:08 2004
@@ -25,6 +25,7 @@
 from zope.schema.accessors import FieldReadAccessor, FieldWriteAccessor
 from zope.interface.verify import verifyClass, verifyObject
 from zope.interface import document
+from zope.interface.interfaces import IMethod
 
 class Test(unittest.TestCase):
 
@@ -62,6 +63,9 @@
             self.assertEqual(getattr(I['getFoo'], attr), getattr(field, attr))
 
         self.assert_(IText.isImplementedBy(I['getFoo']))
+        
+        self.assert_(IMethod.isImplementedBy(I['getFoo']))
+        self.assert_(IMethod.isImplementedBy(I['setFoo']))
 
         self.assertEqual(I['setFoo'].field, field)
         self.assertEqual(I['setFoo'].__name__, 'setFoo')




More information about the Zope3-Checkins mailing list