[Zodb-checkins] CVS: Zope3/src/zope/interface/tests -
test_declarations.py:1.5
Jim Fulton
jim at zope.com
Mon Jun 2 08:08:30 EDT 2003
Update of /cvs-repository/Zope3/src/zope/interface/tests
In directory cvs.zope.org:/tmp/cvs-serv20558/src/zope/interface/tests
Modified Files:
test_declarations.py
Log Message:
Added a test for signatures of object specificatiosn for classes
without interface declarations.
=== Zope3/src/zope/interface/tests/test_declarations.py 1.4 => 1.5 ===
--- Zope3/src/zope/interface/tests/test_declarations.py:1.4 Sun May 18 13:53:06 2003
+++ Zope3/src/zope/interface/tests/test_declarations.py Mon Jun 2 07:08:29 2003
@@ -152,11 +152,28 @@
[])
+def test_signature_w_no_class_interfaces():
+ """
+ >>> from zope.interface import *
+ >>> class C:
+ ... pass
+ >>> c = C()
+ >>> providedBy(c).__signature__
+ ''
+
+ >>> class I(Interface):
+ ... pass
+ >>> directlyProvides(c, I)
+ >>> int(providedBy(c).__signature__
+ ... == directlyProvidedBy(c).__signature__)
+ 1
+ """
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(Test))
suite.addTest(DocTestSuite("zope.interface.declarations"))
+ suite.addTest(DocTestSuite())
return suite
More information about the Zodb-checkins
mailing list