[New-bugs-announce] [issue16080] test_decimal causes other tests to fail with LC_ALL=fr_FR

Manuel Pégourié-Gonnard report at bugs.python.org
Fri Sep 28 12:36:26 CEST 2012


New submission from Manuel Pégourié-Gonnard:

Some tests, namely test_email, test_locale and test_mailbox, normally pass, but fail if both of the following conditions are met:
- the local is fr_FR (or probably any other non-C locale)
- test_decimal is run before them

Steps to repoduce:

% LC_ALL=fr_FR ./python -m test test_email test_locale test_mailbox test_decimal
[1/4] test_email
[2/4] test_locale
[3/4] test_mailbox
[4/4] test_decimal
All 4 tests OK.

% LC_ALL=C ./python -m test test_decimal test_email test_locale test_mailbox              
[1/4] test_decimal
[2/4] test_email
[3/4] test_locale
[4/4] test_mailbox
All 4 tests OK.

% LC_ALL=fr_FR ./python -m test test_decimal test_email test_locale test_mailbox                                                       
[1/4] test_decimal
[2/4] test_email
Warning -- sys.path was modified by test_email
test test_email failed -- Traceback (most recent call last):
  File "/home/mpg/src/cpython/Lib/test/test_email/test_email.py", line 2716, in test_formatdate_usegmt
    time.strftime('%a, %d %b %Y %H:%M:%S -0000', time.gmtime(now)))
AssertionError: 'Fri, 28 Sep 2012 10:05:26 -0000' != 'ven., 28 sept. 2012 10:05:26 -0000'
- Fri, 28 Sep 2012 10:05:26 -0000
? ^^^     ^
+ ven., 28 sept. 2012 10:05:26 -0000
? ^^^^     ^  ++


[3/4/1] test_locale
test test_locale failed -- Traceback (most recent call last):
  File "/home/mpg/src/cpython/Lib/test/test_locale.py", line 246, in test_percent_escape
    self.assertEqual(locale.format_string('%f%%', 1.0), '%f%%' % 1.0)
AssertionError: '1,000000%' != '1.000000%'
- 1,000000%
?  ^
+ 1.000000%
?  ^


[4/4/2] test_mailbox
test test_mailbox failed -- Traceback (most recent call last):
  File "/home/mpg/src/cpython/Lib/test/test_mailbox.py", line 1754, in test_mboxmmdf_to_maildir
    self.assertEqual(msg.get_date(), 0.0)
AssertionError: 1348826768.3964105 != 0.0

1 test OK.
3 tests failed:
    test_email test_locale test_mailbox

----------
components: Tests
messages: 171431
nosy: mpg
priority: normal
severity: normal
status: open
title: test_decimal causes other tests to fail with LC_ALL=fr_FR
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16080>
_______________________________________


More information about the New-bugs-announce mailing list