[RFC/MERGE](0.17) Auto load tests
Ian Clatworthy
ian.clatworthy at internode.on.net
Wed May 2 09:01:09 BST 2007
Robert Collins wrote:
> On Fri, 2007-04-27 at 18:08 -0500, John Arbash Meinel wrote:
>
>> Mostly I'm looking for feedback. I wanted to implement this for a
>> plugin
>> I was writing, because I was getting tired of manually tracking
>> filenames. (Also with plugins you have to be careful about your python
>> path, because you are actually loaded as bzrlib.plugins.PLUGIN.tests
>> not
>> PLUGIN.tests).
>>
>
> I'm personally not a fan of autodiscovery of tests - it just feels like
> too much magic. If we are going to do it I'd rather we looked at
> leveraging nose or trial than rolling our own. -0 from me.
>
> -Rob
>
Robert,
Can you give some more background as to why you dislike autodiscovery of
tests? Are there particular scenarios where you've seen it cause more
problems that it solves?
FWIW, I liked where John was going with this. In my development
workflow, I'll often see the need for a new module, create it as empty
and start a matching test module with the simplest test. I'll run all
tests to confirm the new test fails. But everything works and I'll say
"Damn - forgot to register that new test module". John's stuff sounded
good to me. :-)
I can see the advantage of registering test modules explicitly because
it does force one to think about the most sensible order to run the
tests, module by module at least. But unittests ought to be independent
in any case.
Thoughts?
Ian C.
More information about the bazaar
mailing list