[Grok-dev] a modest proposal: automatically detected doctests

Leonardo Rochael Almeida leorochael at gmail.com
Thu Dec 20 14:13:49 EST 2007


Sorry for the duplicate Brandon, this was meant for the whole list:

I like the idea, but we have to consider how the user is to specify
the environment his doctests run in, and/or what is the convention if
the user doesn't.

It might also be nice to take a look at other testing approaches that
lean on discoverability, like Nosy and py.test

Personally, I much prefer doctest files than doctests embedded in
code, so I'd be happy with something that scanned, say, a doctests
directory and ran all the txt/rst files in there in a standard
environment that included my app already instantiated with a default
name.

On Dec 20, 2007 3:08 PM, Brandon Craig Rhodes <brandon at rhodesmill.org> wrote:
> 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
> doctested.
>
> Before I explore how to implement this, does anyone else have opinions
> about my idea?


More information about the Grok-dev mailing list