This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_formatdate_usegmt fails on non-englisch locale
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.0
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: oefe, r.david.murray, ronaldoussoren
Priority: normal Keywords:

Created on 2008-10-05 12:47 by oefe, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg74343 - (view) Author: Martina Oefelein (oefe) Date: 2008-10-05 12:47
test_formatdate_usegmt (in test_email.py) fails if the environment 
variable LANG is set to a non-english locale.

Python 3.0rc1 on MacOSX 10.5.5

$ LANG=en_US.UTF-8 ./python.exe -E -bb ./Lib/test/regrtest.py -l 
test_email
test_email
1 test OK.

$ LANG=de_DE.UTF-8 ./python.exe -E -bb ./Lib/test/regrtest.py -l 
test_email
test_email
test test_email failed -- Traceback (most recent call last):
  File "/Users/martina/Downloads/Python-
3.0rc1/Lib/email/test/test_email.py", line 2139, in 
test_formatdate_usegmt
    time.strftime('%a, %d %b %Y %H:%M:%S -0000', time.gmtime(now)))
AssertionError: 'Sun, 05 Oct 2008 12:44:04 -0000' != 'So, 05 Okt 2008 
12:44:04 -0000'

1 test failed:
    test_email
msg97019 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-12-30 01:58
I'm not able to reproduce this problem, and I would not expect to be
able to, since LANG should have no effect unless setlocale is called,
which the regression tests should not be doing without restoring it
afterward (and which the tests are not doing at all if you just run
test_email).

That said, I'm on linux, and issue 5125, which is also still open,
suggests this might be an OS X specific problem (maybe specific to
Apple's version of Python?).  Can you reproduce it with the python.org
version of 3.1?
msg97041 - (view) Author: Martina Oefelein (oefe) Date: 2009-12-30 16:49
Apple doesn't ship py3k yet. I observed the issue originally with my own build of 3.0 RC1 (No particular build settings 
were used, just ./configure ; make ; make test). It also happens with the build of Python 3.0.1 that is installed on my 
machine (this should be the official MacOS X build from Python.org), on MacOS X 10.6.2.

It doesn't happen with Python 3.1 anymore (and neither with 2.6.1 and 2.7 Alpha 1).
msg97059 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-12-30 20:52
In that case, since 3.0 is no longer in maintenance, I'm closing this
bug as out of date.
History
Date User Action Args
2022-04-11 14:56:40adminsetgithub: 48296
2009-12-30 20:52:01r.david.murraysetstatus: open -> closed
resolution: out of date
messages: + msg97059

stage: resolved
2009-12-30 16:49:32oefesetmessages: + msg97041
2009-12-30 01:58:25r.david.murraysetpriority: normal
nosy: + r.david.murray, ronaldoussoren
messages: + msg97019

2008-10-05 12:47:16oefecreate