[Checkins] SVN: zope.introspectorui/trunk/src/zope/introspectorui/code.txt Update tests.
Uli Fouquet
uli at gnufix.de
Tue Aug 12 21:34:14 EDT 2008
Log message for revision 89771:
Update tests.
Changed:
U zope.introspectorui/trunk/src/zope/introspectorui/code.txt
-=-
Modified: zope.introspectorui/trunk/src/zope/introspectorui/code.txt
===================================================================
--- zope.introspectorui/trunk/src/zope/introspectorui/code.txt 2008-08-13 01:33:52 UTC (rev 89770)
+++ zope.introspectorui/trunk/src/zope/introspectorui/code.txt 2008-08-13 01:34:14 UTC (rev 89771)
@@ -27,6 +27,10 @@
>>> root = located(object(), None, '')
>>> zope_pkg = located(Package('zope'), root, u'zope')
+We use pprint to make complex output ordered and readable::
+
+ >>> from pprint import pprint
+
Packages
========
@@ -108,21 +112,26 @@
>>> view_util = getMultiAdapter((info_util, request), name='index')
Module views provide lists of dicts for contained classes and
-functions. Each dict tells about the name and URL of a contained
-item::
+functions. Each dict tells about the name, the URL and the docstring
+of a contained item::
>>> view_code.getClassURLs()
[{'url': 'http://127.0.0.1/zope/introspector/code/Class',
+ 'doc': u'',
'name': 'Class'},
{'url': 'http://127.0.0.1/zope/introspector/code/Code',
+ 'doc': u'',
'name': 'Code'},
...
-The ``util`` module provides some functions::
+The ``util`` module provides some functions for which we also get the
+name, the URL and the docstring::
- >>> view_util.getFunctionURLs()
- [{'url': 'http://127.0.0.1/zope/introspector/util/get_function_signature',
- 'name': 'get_function_signature'},
+
+ >>> pprint(view_util.getFunctionURLs())
+ [{'doc': 'Get an object denoted by a dotted name.\n ',
+ 'name': 'resolve',
+ 'url': 'http://127.0.0.1/zope/introspector/util/resolve'},
...]
More information about the Checkins
mailing list