[Grok-dev] a modest proposal: automatically detected doctests
ct at gocept.com
Fri Dec 21 05:11:16 EST 2007
Am Donnerstag, den 20.12.2007, 12:08 -0500 schrieb Brandon Craig Rhodes:
> Since Grok is not shy about recursively descending my application in
> order to discover its packages, modules, and classes, I have come to
> believe that it should also not be shy about discovering my doctests.
> That is, running "bin/test" in my Grok instance should automatically,
> without even asking, instantiate each of my source code files inside
> of a DocFileSuite, and run them. I shouldn't have to go inside of the
> "test/" directory and ask for each of my source code files to be
> Before I explore how to implement this, does anyone else have opinions
> about my idea?
My experience and what I'd like:
* pick up any .txt file in the source code
* make it a docfilesuite
* set the standard flags (at least ELLIPSIS, REPORT_NDIFF and
For the environment: it's probably not the best idea but making
everything a functional docfilesuite would hand out enough environment
Something that I was thinking about a while ago was using ReST metadata
to declare unit/functional test. From a resource perspective it probably
doesn't really matter and we could just make it a functional test.
This would require to dynamically create a functional layer that loads
up the package in its normal environment.
That's the easiest solution I can think of. I'd love to see unit test
gocept gmbh & co. kg - forsterstrasse 29 - 06112 halle (saale) - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20071221/df438afe/attachment.bin
More information about the Grok-dev