[Grok-dev] Re: where do I put doctests for my models?

Martijn Faassen faassen at startifact.com
Tue Aug 7 12:35:17 EDT 2007

Uli Fouquet wrote:
> I was wondering, whether it would be useful for beginners to have some
> dumb testing modules already available as boilerplates when they install
> a fresh Grok project.

> On the one hand this would increase the number of files of a 'stock Grok
> project' and might confuse beginners. On the other hand it could
> encourage use of tests, which is, what we all want (I neglected this at
> the beginning of my project; a really miserable mistake ;-).

I'd like to try to avoid generating testing boilerplate. The response to 
boilerplate shouldn't be to generate it, but to look for ways to make it 
unnecessary. In the mean time we should provide good documentation (that 
will also help us with analysis), which you are doing.

>> Could I submit a tutorial showing the current state-of-the-art in
>> building tests for a Grok app, so that other beginners have somewhere
>> to start from?
> After your first posting I started to write a mini-tutorial for
> automated testing with Grok. It turned out to quickly become something
> quite complex, so it might be a 'maxi'-tutorial.

Great! I'll try to get some time to review this soon; remind me!

> Making the testrunner to scan exotic things from my point of view would
> be too much of black magic and confuse people easily.

If we provide some nice base classes and have martian scan for things we 
don't have to scan for exotic things at all. Basically my goal is to 
replace test_suite() with the appropriate classes that are grokked.



More information about the Grok-dev mailing list