[TIP] Defining a convention for running tests, #2

Michael Foord fuzzyman at voidspace.org.uk
Sat Feb 27 14:12:59 PST 2010


On 27/02/2010 21:54, Robert Collins wrote:
> On Sat, 2010-02-27 at 21:31 +0000, Michael Foord wrote:
>    
>> On 27/02/2010 20:55, Robert Collins wrote:
>>      
>>> On Sat, 2010-02-27 at 12:13 -0800, C. Titus Brown wrote:
>>>
>>>        
>>>> Hi all,
>>>>
>>>> I've updated the README for my SomePackage example code,
>>>>
>>>>          
>>> So, my key points are, I guess:
>>>
>>> python -m somepackage.tests.run - isn't very useful:
>>>   - doesn't define getting JUnitXML (is it a command line option? should
>>> you use subunit? should you use nose-junit, should you use
>>> xmltestrunner?)
>>>
>>>        
>> It is no less useful than "setup.py test" and Titus intends it to be
>> for a different situation - post installation where there is no
>> setup.py. It provides a standard entry point for running tests. The
>> issue of command line options is real but orthoganal.
>>      
> It is no less useful, but its not more useful either. If we define API
> conformance instead, then python -m<runner>  somepackage.tests is no
> less useful than *either* and can be more useful: runner glue can choose
> result objects, provide command line handling that the user finds
> atractive, provide parallel execution glue etc, while still being
> standardised.
>    

Except how does a project *specify* what the <runner> argument is 
supposed to be?

This is the value a standard entry point provides.

Michael

-- 
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