test_format fails (because of test__locale)

"Martin v. Löwis" martin at v.loewis.de
Thu Jul 15 07:53:52 CEST 2004

Irmen de Jong wrote:
> That was great, I quickly found out that test__locale is the cause.
> Not only test_format but also test_unicode fail on my Mandrake 10 box.
> My default locale is nl_NL. 

Ok. Can you please run test__locale in verbose mode to find out what
the last locale is that it uses? Let's call it X.

Can you please then run interactively

locale.setlocale(locale.LC_NUMERIC, X)
print '%07.2f' % 42

It appears from the test results that this gives '0042,00' for
you; please confirm that it does.

It is bad that test__locale does not restore the locale, but perhaps
we take out that test entirely. However, the behaviour of % is not
supposed to change, so we need to investigate why it changes on your


More information about the Python-list mailing list