[Zope3-checkins] CVS: Zope3/src/zope/app/apidoc/classmodule - tests.py:1.4

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Mar 29 21:00:55 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/apidoc/classmodule
In directory cvs.zope.org:/tmp/cvs-serv12350/src/zope/app/apidoc/classmodule

Modified Files:
	tests.py 
Log Message:


Added convenience method to create a details view for functions.



Reactivated tests.




=== Zope3/src/zope/app/apidoc/classmodule/tests.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/apidoc/classmodule/tests.py:1.3	Mon Mar 29 17:24:57 2004
+++ Zope3/src/zope/app/apidoc/classmodule/tests.py	Mon Mar 29 21:00:54 2004
@@ -33,6 +33,7 @@
 
 from zope.app.apidoc.classmodule import ClassModule
 from zope.app.apidoc.classmodule.browser import ClassDetails, ModuleDetails
+from zope.app.apidoc.classmodule.browser import FunctionDetails
 from zope.app.apidoc.interfaces import IDocumentationModule
 
 
@@ -60,6 +61,19 @@
     placelesssetup.tearDown()
 
 
+def foo(cls, bar=1, *args):
+    """This is the foo function."""
+foo.deprecated = True
+
+
+def getFunctionDetailsView():
+    cm = zapi.getUtility(None, IDocumentationModule, 'Class')
+    view = FunctionDetails()
+    view.context = zapi.traverse(cm, 'zope/app/apidoc/classmodule/tests/foo')
+    view.request = TestRequest()
+    return view
+
+
 def getClassDetailsView():
     cm = zapi.getUtility(None, IDocumentationModule, 'Class')
     view = ClassDetails()
@@ -78,9 +92,9 @@
 
 def test_suite():
     return unittest.TestSuite((
-        #DocTestSuite('zope.app.apidoc.classmodule.browser',
-        #             setUp=setUp, tearDown=tearDown),
-        #DocTestSuite('zope.app.apidoc.classmodule'),
+        DocTestSuite('zope.app.apidoc.classmodule.browser',
+                     setUp=setUp, tearDown=tearDown),
+        DocTestSuite('zope.app.apidoc.classmodule'),
         ))
 
 if __name__ == '__main__':




More information about the Zope3-Checkins mailing list