[TIP] Why do we need loadTestsFromPackage ?

Michael Foord fuzzyman at voidspace.org.uk
Tue Apr 14 06:44:52 PDT 2009


Olemis Lang wrote:
> On Tue, Apr 14, 2009 at 5:39 AM, Michael Foord
> <fuzzyman at voidspace.org.uk> wrote:
>   
>> Robert Collins wrote:
>>     
>>> On Tue, 2009-04-14 at 11:13 +0100, Michael Foord wrote:
>>>       
>> That specifically requires a package name as input rather than a
>> filesystem location - so that is making a decision!
>>
>> I think I'm now marginally in favour of providing the implementation of
>> this in loadTestsFromPackage - with the load_tests protocol being in
>> loadTestsFromModule as you showed previously.
>>
>>     
>
> Please could anybody tell me why is it necessary to add
> loadTestsFromPackage ? I dont really think its necessary.
>
> Its another method and I dont think that complicating the loaders
> interface be a good decision.
>
> What is the difference between loadTestsFromPackage and
> loadTestsFromModule ? The only difference I see so far is the
> discovery strategy, so IMHO a separate loader should handle this ...
>
> Pls I'd really want to understand
>
>   
For discovery. If we do it in a new loader (and I don't see the 
difference beyond your notional ideas of OO purity) what would the 
interface to the discovery mechanism look like?

You say you don't understand why, I don't understand why not.

Michael

-- 
http://www.ironpythoninaction.com/




More information about the testing-in-python mailing list