
On Thu, Dec 31, 2009 at 10:30 AM, Martin (gzlist) <gzlist@googlemail.com> wrote:
Thanks for the quick response.
On 30/12/2009, Benjamin Peterson <benjamin@python.org> wrote:
When I made that change, I didn't know that the __unittest "hack" was being used elsewhere outside of unittest, so I felt fine replacing it with another. While I still consider it an implementation detail, I would be ok with exposing an "official" API for this. Perhaps __unittest_ignore_traceback?
Well, bazaar has had the trick for a couple of years, and googling around now turns up some other projects using it or thinking about it: <http://github.com/gfxmonk/mocktest/commit/b5e94f7ee06ab627cea2c9cf90d0aeb63e...> <http://bitbucket.org/uche/amara/changeset/eeaf69f48271/> <http://twistedmatrix.com/trac/ticket/4127>
Add `dutest` and probably `nose` [2]_ and ...
Reinstating the old implementation (with the same name) would mean that existing code would keep working with Python 2.7
IOW ... if it is removed all the libraries will have to change and check for the Py version and ... (probably not a big deal depending on the details of the «solution»)
but maybe a discussion could start about a new, less hacky, way of doing the same
I am strongly -1 for modifying the classes in «traditional» unittest module [2]_ (except that I am strongly +1 for the package structure WITHOUT TOUCHING anything else ...) , and the more I think about it I am more convinced ... but anyway, this not a big deal (and in the end what I think is not that relevant either ... :o). So ... pass
May not be worthwhile making life more complicated though, there aren't *that* many unittest-extending projects.
But every library extending `unittest` will do it or otherwise not-so-useful error messages will be displayed ;o) PS: Happy New Year ! BTW .. [1] [feature] nosexml should omit trace frames where `__unittest... (http://code.google.com/p/python-nosexml/issues/detail?id=4#c0) .. [2] Assessment of unittest 2.7 API : new features and opinions (http://simelo-en.blogspot.com/2009/12/assessment-of-unittest-27-api-new.html) -- Regards, Olemis. Blog ES: http://simelo-es.blogspot.com/ Blog EN: http://simelo-en.blogspot.com/ Featured article: Free new ripit 1.3.3 Download - mac software - http://feedproxy.google.com/~r/TracGViz-full/~3/KFwyUTKH0vI/