Skip to content

test_getsetlocale_issue1813 failed on OpenBSD #69378

Closed

Description

@rpointel
mannequin
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']

    Activity

    1. rpointel commented on Sep 20, 2015

      rpointelmannequin
      MannequinAuthor

      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.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      testsTests in the Lib/test dir
      on Sep 20, 2015
    3. terryjreedy commented on Dec 8, 2020

      @terryjreedy
      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.

    4. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directorytestsTests in the Lib/test dir

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions