[Zope3-checkins] CVS: Zope3/src/zope/app/apidoc - tests.py:1.3
Stephan Richter
srichter at cosmos.phy.tufts.edu
Sun Mar 28 18:39:21 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/apidoc
In directory cvs.zope.org:/tmp/cvs-serv21977/src/zope/app/apidoc
Modified Files:
tests.py
Log Message:
Added tests.
Added convinience function for converting a dict to a tuple and pretty-print
it.
=== Zope3/src/zope/app/apidoc/tests.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/apidoc/tests.py:1.2 Sat Mar 13 16:03:00 2004
+++ Zope3/src/zope/app/apidoc/tests.py Sun Mar 28 18:39:20 2004
@@ -15,6 +15,7 @@
$Id$
"""
+import pprint
import unittest
from zope.app import zapi
from zope.app.traversing.interfaces import IContainmentRoot
@@ -37,6 +38,8 @@
placelesssetup.tearDown()
+# Generally useful classes and functions
+
class Root:
implements(IContainmentRoot)
@@ -45,10 +48,22 @@
def rootLocation(obj, name):
return LocationProxy(obj, Root(), name)
+
+
+def pprintDict(info):
+ print_ = pprint.PrettyPrinter(width=69).pprint
+ info = info.items()
+ info.sort()
+ return print_(info)
+
+
def test_suite():
return unittest.TestSuite((
- DocTestSuite('zope.app.apidoc'),
+ DocTestSuite('zope.app.apidoc',
+ setUp=setUp, tearDown=tearDown),
+ DocTestSuite('zope.app.apidoc.browser.apidoc',
+ setUp=setUp, tearDown=tearDown),
DocTestSuite('zope.app.apidoc.utilities'),
))
More information about the Zope3-Checkins
mailing list