Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_getsetlocale_issue1813 failed on OpenBSD #69378

Closed
rpointel mannequin opened this issue Sep 20, 2015 · 2 comments
Closed

test_getsetlocale_issue1813 failed on OpenBSD #69378

rpointel mannequin opened this issue Sep 20, 2015 · 2 comments
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir

Comments

@rpointel
Copy link
Mannequin

rpointel mannequin commented Sep 20, 2015

BPO 25191
Nosy @malemburg, @loewis, @terryjreedy, @serhiy-storchaka
Superseder
  • bpo-37945: [Windows] test_locale.TestMiscellaneous.test_getsetlocale_issue1813() fails
  • Files
  • patch-Lib_test_test_locale_py: patch to skip the second part if test does not work
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-12-08.14:01:21.967>
    created_at = <Date 2015-09-20.08:31:18.372>
    labels = ['tests', 'library']
    title = 'test_getsetlocale_issue1813 failed on OpenBSD'
    updated_at = <Date 2020-12-08.14:01:21.966>
    user = 'https://bugs.python.org/rpointel'

    bugs.python.org fields:

    activity = <Date 2020-12-08.14:01:21.966>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-12-08.14:01:21.967>
    closer = 'terry.reedy'
    components = ['Library (Lib)', 'Tests']
    creation = <Date 2015-09-20.08:31:18.372>
    creator = 'rpointel'
    dependencies = []
    files = ['40526']
    hgrepos = []
    issue_num = 25191
    keywords = []
    message_count = 2.0
    messages = ['251153', '382738']
    nosy_count = 5.0
    nosy_names = ['lemburg', 'loewis', 'terry.reedy', 'rpointel', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '37945'
    type = None
    url = 'https://bugs.python.org/issue25191'
    versions = ['Python 3.5']

    @rpointel
    Copy link
    Mannequin Author

    rpointel mannequin commented Sep 20, 2015

    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.

    @rpointel rpointel mannequin added stdlib Python modules in the Lib dir tests Tests in the Lib/test dir labels Sep 20, 2015
    @terryjreedy
    Copy link
    Member

    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 bpo-37945 as the latter has extensive, but to date inconclusive, analysis and discussion.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant