[issue9868] test_locale leaves locale changed

Hirokazu Yamamoto report at bugs.python.org
Thu Sep 23 16:18:36 CEST 2010


Hirokazu Yamamoto <ocean-city at m2.ccsnet.ne.jp> added the comment:

> unittest *can't* know which setUp methods have already been called if
> an error occurs in one of them (because they are called explicitly by
> the sub-classes and not by unittest itself).

Well, C++ constructor/destructor behaves like that when constructor
of subclass raised exception. Destructors of super classes are called
in reverse order. The benefit of it is implementator of subclass
don't have to care about finalization of super class. It is done
automatically. But if explicit call is essential for us, my proposal
is not needed.

> Given this, the specific fix suggested seems good.
Thanks, I'll commit this.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9868>
_______________________________________


More information about the Python-bugs-list mailing list