I
Irmen de Jong
Tim said:[Irmen de Jong]
,,,
As Michael Hudson pointed out it's probably a test that
messes with the locale settings and forgets to set them back,
or some such.
In case you don't already know it, regrtest.py's little-used -f
argument lets you specify a file, containing the names of the tests
you want to run.
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. Behold:
[irmen@atlantis Python-2.4a1]$ cat testcases.in
test__locale
test_format
test_unicode
[irmen@atlantis Python-2.4a1]$ ./python Lib/test/regrtest.py -f testcases.in
test__locale
test_format
test test_format produced unexpected output:
**********************************************************************
*** line 2 of actual output doesn't appear in expected output after line 1:
+ u'%f' % (1.0,) == u'1,000000' != '1.000000'
**********************************************************************
test_unicode
test test_unicode failed -- Traceback (most recent call last):
File "/home/irmen/BUILD/Python-2.4a1/Lib/test/test_unicode.py", line 358, in
test_formatt ing
string_tests.MixinStrUnicodeUserStringTest.test_formatting(self)
File "/home/irmen/BUILD/Python-2.4a1/Lib/test/string_tests.py", line 615, in
test_formatt ing
self.checkequal('0042.00', '%07.2f', '__mod__', 42)
File "/home/irmen/BUILD/Python-2.4a1/Lib/test/string_tests.py", line 56, in checkequal
realresult
AssertionError: u'0042.00' != u'0042,00'
1 test OK.
2 tests failed:
test_format test_unicode
[irmen@atlantis Python-2.4a1]$
--Irmen