[Zodb-checkins] CVS: Zope3/src/zope/interface/tests -
test_interface.py:1.6
Jim Fulton
jim at zope.com
Tue Jun 24 16:04:42 EDT 2003
Update of /cvs-repository/Zope3/src/zope/interface/tests
In directory cvs.zope.org:/tmp/cvs-serv24366/interface/tests
Modified Files:
test_interface.py
Log Message:
Fixed a bug in interface initialization that caused declarations for
__doc__ to be lost.
=== Zope3/src/zope/interface/tests/test_interface.py 1.5 => 1.6 ===
--- Zope3/src/zope/interface/tests/test_interface.py:1.5 Sat May 3 12:36:05 2003
+++ Zope3/src/zope/interface/tests/test_interface.py Tue Jun 24 15:04:41 2003
@@ -146,6 +146,23 @@
meth = _I1['f12']
self.assertEqual(meth.getTaggedValue('optional'), 1)
+ def test___doc___element(self):
+ class I(Interface):
+ "xxx"
+
+ self.assertEqual(I.__doc__, "xxx")
+ self.assertEqual(list(I), [])
+
+ class I(Interface):
+ "xxx"
+
+ __doc__ = Attribute('the doc')
+
+ self.assertEqual(I.__doc__, "")
+ self.assertEqual(list(I), ['__doc__'])
+
+
+
class _I1(Interface):
a1 = Attribute("This is an attribute")
More information about the Zodb-checkins
mailing list