[TIP] unittest2.util

Michael Foord fuzzyman at voidspace.org.uk
Mon Sep 27 04:19:03 PDT 2010


  On 25/09/2010 15:15, Matthew Woodcraft wrote:
> Are the functions in unittest2.util considered part of the public API (that
> is, can I rely on them staying around in future versions)?

Hmm... actually a difficult question.

I would rather consider the public API of unittest2 to be the names 
exported at the top level (i.e. if you can import it from directly from 
unittest2 then it is public - anything else and there is less of a 
guarantee). I realise that in the plugins branch I haven't followed this 
rule precisely and this needs cleaning up.

For unittest in Python itself I probably have to provide a stronger 
guarantee though... This defacto means that functions appearing in 
*released* versions of unittest.util (whose names don't begin with an 
underscore) are safe to use.

Which functions are you interested in? If they are non-trivial and 
generally useful or necessary then I can export them at the top level. 
Importing from the top level allows me to move things around without 
breaking your code.

All the best,

Michael Foord

> -M-
>
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python


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