[Grok-dev] Re: Easier test setup with new grok.testing
Martijn Faassen
faassen at startifact.com
Fri Feb 1 08:45:51 EST 2008
Uli Fouquet wrote:
> Hi there,
>
> Martijn Faassen wrote:
>
>>> import grok.testing
>>> test_suite = grok.grok_tests('cave')
>> This would indeed be nice.
>
> No problem. @Luciano: I assume grok.grok_doctests() will be an alias for
> grok.testing.grok_doctests() then. So you can use the namespace.
Oh, just to be clear: I think all this stuff should only be in the
'grok.testing' namespace, not in the 'grok' namespace.
[snip]
>> Ideas? It might be nice if we could state what globs we want to use in
>> the doctest itself. That makes me think we could simply import them:
>>
>> >>> from mypackage.tests import myhelper
>>
>> That might be actually clearer than the use of globs as it doesn't
>> introduce any special casing at all. Any reason why this wouldn't work?
>
> I'm not sure, whether I understand correctly. Are you talking about
> avoiding `globs` at all (at test registration time)?
Yes, I was assuming (wrongly) there was no way to pass in globs, and
thinking about alternatives. I figured Python imports are one. :)
Regards,
Martijn
More information about the Grok-dev
mailing list