[Zope3-checkins] CVS: Zope3/src/zope/app/tests - annotations.py:1.3
test_attributeannotations.py:1.5
Stephan Richter
srichter at cosmos.phy.tufts.edu
Fri Feb 13 17:24:10 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/tests
In directory cvs.zope.org:/tmp/cvs-serv8841/src/zope/app/tests
Modified Files:
annotations.py test_attributeannotations.py
Log Message:
Implemented missing __delitem__() method. It is a mystery to me how the
tests passed before. Also updated the tests a bit.
=== Zope3/src/zope/app/tests/annotations.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/tests/annotations.py:1.2 Wed Dec 25 09:13:26 2002
+++ Zope3/src/zope/app/tests/annotations.py Fri Feb 13 17:24:09 2004
@@ -11,19 +11,22 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""
+"""General Annotations Tests
+
+All objects implementing 'IAnnotations' should pass these tests. They might be
+used as base tests for real implementations.
-Revision information:
$Id$
"""
-
+import unittest
from zope.interface.verify import verifyObject
from zope.app.interfaces.annotation import IAnnotations
-class Annotations:
- """
- Test the IAnnotations interface. Expects the IAnnotations
- to be in self.annotations
+class IAnnotationsTest(unittest.TestCase):
+ """Test the IAnnotations interface.
+
+ The test case class expects the 'IAnnotations' to be in
+ 'self.annotations'.
"""
def setUp(self):
=== Zope3/src/zope/app/tests/test_attributeannotations.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/tests/test_attributeannotations.py:1.4 Wed Jun 4 07:13:49 2003
+++ Zope3/src/zope/app/tests/test_attributeannotations.py Fri Feb 13 17:24:09 2004
@@ -11,15 +11,13 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""
+"""Tests the 'AttributeAnnotations' adapter.
-Revision information:
$Id$
"""
-
-from unittest import TestCase, main, makeSuite
+from unittest import main, makeSuite
from zope.testing.cleanup import CleanUp # Base class w registry cleanup
-from zope.app.tests.annotations import Annotations
+from zope.app.tests.annotations import IAnnotationsTest
from zope.app.attributeannotations import AttributeAnnotations
from zope.app.interfaces.annotation import IAttributeAnnotatable
from zope.interface import implements
@@ -27,17 +25,15 @@
class Dummy:
implements(IAttributeAnnotatable)
-class Test(CleanUp, Annotations, TestCase):
+class AttributeAnnotationsTest(IAnnotationsTest, CleanUp):
def setUp(self):
self.annotations = AttributeAnnotations(Dummy())
- #super(Test,self).setUp()
- Annotations.setUp(self)
- CleanUp.setUp(self)
+ super(AttributeAnnotationsTest, self).setUp()
def test_suite():
- return makeSuite(Test)
+ return makeSuite(AttributeAnnotationsTest)
if __name__=='__main__':
main(defaultTest='test_suite')
More information about the Zope3-Checkins
mailing list