[issue9868] test_locale leaves locale changed

2010-09-24 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Committed in r84973(py3k) and r84990(release31-maint). -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue9868] test_locale leaves locale changed

2010-09-23 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: > Destructors are special cased in many languages and tearDown is not a > destructor. Yes, but they are similar. > More importantly though the change you suggest would be > backwards incompatible. > The 'correct' way to do this in new code is to use cleanU

[issue9868] test_locale leaves locale changed

2010-09-23 Thread Michael Foord
Michael Foord added the comment: Destructors are special cased in many languages and tearDown is not a destructor. More importantly though the change you suggest would be backwards incompatible. The 'correct' way to do this in new code is to use cleanUp functions which *are* called even if a

[issue9868] test_locale leaves locale changed

2010-09-23 Thread Hirokazu Yamamoto
Hirokazu Yamamoto 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

[issue9868] test_locale leaves locale changed

2010-09-23 Thread Michael Foord
Michael Foord 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). Given this, the specific fix suggested seems good. --

[issue9868] test_locale leaves locale changed

2010-09-20 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +giampaolo.rodola, lemburg, michael.foord, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing

[issue9868] test_locale leaves locale changed

2010-09-16 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This patch is *as is* patch. Index: Lib/test/test_locale.py === --- Lib/test/test_locale.py (revision 84824) +++ Lib/test/test_locale.py (working copy) @@ -352,13 +352,13 @@ locale_

[issue9868] test_locale leaves locale changed

2010-09-15 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This happens because in Lib/test/test_locale.py, TestEnUSCollation#setUp raises exception after BaseLocalizedTest.setUp(self) changed locale. tearDown never be called when setUp failedsetUp failed. It's easy to fix this as is, but I think more general soluti

[issue9868] test_locale leaves locale changed

2010-09-15 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : I noticed test_locale leaves locale changed. # test_boo is simple test just to print windows error. E:\python-dev\py3k\Lib\test>py3k -m test.regrtest test_locale test_boo [1/2] test_locale [2/2] test_boo test test_boo failed -- Traceback (most recent call