[Zope3-dev] PyCon doctest talk
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Apr 1 07:39:20 EST 2004
On Wednesday 31 March 2004 10:13, Jim Fulton wrote:
> I promised I'd make my talk available:
>
> http://www.python.org/pycon/dc2004/papers/4/PyCon2004DocTestUnit/
Jim,
I just read through the slides and noticed that I already started a feature
that you might be interested in. I have written a little pprint function in
zope.app.apidoc.tests, which takes a data structure, converts all
dictionaries in it to a sorted list of 2-tuples and then returns the result
using the pprint module. The max width of the output is 69, so that the
output will always fit in a doc string.
Of course, much could be improved, for example also converting class instances
to a better comparable form or allow to specify the width dynamically, but I
think this is a start. It made testing the many methods of view classes much
simpler.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-dev
mailing list