[Python-Dev] setUpClass and setUpModule in unittest

Michael Foord fuzzyman at voidspace.org.uk
Tue Feb 9 20:17:05 CET 2010


On 09/02/2010 19:14, Holger Krekel wrote:
> [snip...]
>>> and
>>> all tests in the class / module will have an explicit skip in the event of a
>>> setUp failure.
>>>
>>>        
> I think reporting tests as skipped when the setup failed is a bad idea.
> Out of several years of practise with skips and large test suites (and
> talking/experiencing many users :) i recommend to reserve skips for
> platform/dependency/environment mismatches. A Setup Error should
> just error or fail all the tests in its scope.
>    

A SetupError instead of a skip sounds good to me. Thanks (although 
technically the test has been 'skipped' but that's playing with 
semantics...)

Michael

> cheers,
> holger
>    


-- 
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 Python-Dev mailing list