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
标题: test_getsetlocale_issue1813 failed on OpenBSD
类型: Stage: resolved
Components: Library (Lib), Tests Versions: Python 3.5
process
状态: closed Resolution: duplicate
Dependencies: 后续: [Windows] test_locale.TestMiscellaneous.test_getsetlocale_issue1813() fails
View: 37945
分配给: 抄送列表: lemburg, loewis, rpointel, serhiy.storchaka, terry.reedy
优先级: normal 关键字:

Created on 2015-09-20 08:31 by rpointel, last changed 2022-04-11 14:58 by admin. This issue is now closed.

文件
文件名 上传时间 Description 编辑
patch-Lib_test_test_locale_py rpointel, 2015-09-20 08:31 patch to skip the second part if test does not work
Messages (2)
msg251153 - (view) Author: Remi Pointel (rpointel) * 日期: 2015-09-20 08:31
Hi,

the test test_getsetlocale_issue1813 in ./Lib/test/test_locale.py failed on OpenBSD:

======================================================================
...........s....ss..................testing with ('tr_TR', 'ISO8859-9') E....ss
ERROR: test_getsetlocale_issue1813 (__main__.TestMiscellaneous)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Lib/test/test_locale.py.orig", line 515, in test_getsetlocale_issue1813
    locale.setlocale(locale.LC_CTYPE, loc)
  File "/usr/ports/pobj/Python-3.5.0/Python-3.5.0/Lib/locale.py", line 595, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

----------------------------------------------------------------------
Ran 38 tests in 0.040s

FAILED (errors=1, skipped=5)

The first setlocale(locale.LC_CTYPE, 'tr_TR') works fine, but loc = locale.getlocale(locale.LC_CTYPE) then locale.setlocale(locale.LC_CTYPE, loc) does not work.

Attached is a patch to skip the second part if it does not work, is it correct?

Thanks,

Remi.
msg382738 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) 日期: 2020-12-08 14:01
The problem with this patch is that the second assert is the point of the test.  Do get/set_locale work in the TR locale?

Although this issue came first, I am closing it as a duplicate of #37945 as the latter has extensive, but to date inconclusive, analysis and discussion.
历史
日期 用户 动作 参数
2022-04-11 14:58:21admin修改github: 69378
2020-12-08 14:01:21terry.reedy修改状态: open -> closed

后续: [Windows] test_locale.TestMiscellaneous.test_getsetlocale_issue1813() fails

抄送: + terry.reedy
消息: + msg382738
resolution: duplicate
stage: resolved
2020-12-08 13:42:43terry.reedy链接issue31636 superseder
2015-09-20 08:47:56serhiy.storchaka修改抄送: + lemburg, loewis, serhiy.storchaka
2015-09-20 08:31:18rpointel创建