[TIP] Testing locale-dependent behaviour

Thomas Lotze thomas at thomas-lotze.de
Tue Nov 25 12:00:47 PST 2008

Alexandre Fayolle wrote:

> Le Tuesday 25 November 2008 13:35:31 Michael Foord, vous avez écrit :
>> Our functional test suite (Windows) changes the machine locale in a
>> couple of places (and changes it back again of course) to regression
>> tests problems we had with specific locales (usually Unicode errors I
>> think). I don't have the details to hand, but could get them if it would
>> be useful.
> I think the OP's problem is that on a Unix-like machine, locales other
> than "C" and "POSIX" are not mandatory, and may not be installed, so
> setlocale(3) may return NULL if the requested locale is not available. He
> is therefore looking for a way for an unpriviledged user to locally
> install a locale which is required by some tests.

Exactly. But since I do not know enough about Windows, I guess Michael's
knowledge will be valuable if (and I hope this is really an "if", not a
"when" ;o)) the same problem arises outside of a Linux environment.


More information about the testing-in-python mailing list