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

Fernando Correa Neto fcdoth at gmail.com
Thu Dec 20 14:51:02 EST 2007


On Dec 20, 2007 5:13 PM, Leonardo Rochael Almeida <leorochael at gmail.com> wrote:
> 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.

++1 if there is a way to define a common/sufficient environmnet to run
the tests. Besides that, I think Philipp has done some work groking
tests in the past. Not sure if they apply though.

> 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?
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev

More information about the Grok-dev mailing list