[Zope3-checkins] CVS: Zope3/src/zope/interface/tests - test_declarations.py:1.5
Jim Fulton
jim@zope.com
Mon, 2 Jun 2003 07:08:30 -0400
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