[Python-Dev] RE: [Python-checkins] python/dist/src/Lib/test test_logging.py,1.9,1.10

Tim Peters tim.one@comcast.net
Thu, 17 Jul 2003 23:26:25 -0400


[Jeremy]
> Modified Files:
> 	test_logging.py
> Log Message:
> Restore the locale to "C" on exit.
>
> If this doesn't happen, it leaves the locale in a state that can cause
> other tests to fail.  For example, running test_strptime,
> test_logging, and test_time in that order.

Or test_logging, test_strptime in that order, with no other tests between
them.  Can someone who understands the intended use of locale (i.e., any
non-American <0.5 wink>) figure out the right thing to do here?  Or is
forcing locale.LC_ALL to "C" at the end of test_logging the right thing
already?  I kinda doubt it, cuz it seems to bode ill if test_strptime fails
"just because" someone changed locale before test_strptime got run.