[TIP] Guidelines for where to put tests & how to package them

Michael Foord fuzzyman at voidspace.org.uk
Fri Feb 26 11:36:59 PST 2010


On 26/02/2010 19:27, Olemis Lang wrote:
> [snip...]
>> Why not just:
>>
>>      tests='somepackage.tests'
>>
>>      
> Better explicit than implicit : what are `tests` ? test_suite is a test suite !
>
> so IMHO -1
>    

Tests are a test package. What if you want to specify something other 
than a test suite?

>    
>> Or even default to test discovery?
>>
>>      
> test command performs test discovery (as a last recourse AFAICR, /me
> cc-ing to P.J. Eby because probably he has further updates ;o) using a
> loader: setuptools.comand.test.xxx
>    
I'd rather follow up with Tarek (cc'd) as the lead maintainer of both 
distribute (the maintained fork of setuptools) and of distutils(2).

> BTW, I am strongly -1 for using the discovery protocol introduced in
> 2.7 (AFAICR), specially because it collides with test_suite
You'd rather not use a unittest supported protocol because it clashes 
with an unsupported protocol?

>   and many
> other arguments ...
Can you be specific?


> so it would be very nice when defining packaging
> conventions, layout ... not to enforce the use of that protocol, so
> that if another discovery is used then it could still be compatible
> with the more abstract good practices. (all this said from my selfish
> position, I confess)
>    

Yes, but get_suite/test_suite is not supported, so distutils2 still 
*should* use a unittest supported protocol. Probably Tarek and I need to 
discuss how the setup.py test command should work for distutils2. It 
should support non-unittest tests as well (I guess?) so specifying a 
unittest suite is not necessarily ideal.

Michael
>    
>> All the best,
>>
>> Michael Foord
>>
>>      
> PS: Sorry if not possible to distinguish where comments and replies start
> :-/
>
>    


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.





More information about the testing-in-python mailing list