[Grok-dev] Re: a modest proposal: automatically detected doctests
tseaver at palladion.com
Fri Dec 21 11:59:14 EST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Christian Theune wrote:
> 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
> for everybody.
> 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
> support though.
- -1 to automagically including *any* text file. +0 if the inclusion
depended on finding a bit of marker text somewhere in the first few
lines of the file.
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Grok-dev