Skip to content

test_format.py failed on test_locale if LC_ALL is not set #4970

Open
@qingshi163

Description

@qingshi163

The following error message comes when running test_format.py

I checked my enviroment that LC_ALL is not set, if I set it than the code will success.

======================================================================
FAIL: test_locale (__main__.FormatTest.test_locale)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_format.py", line 446, in test_locale
    locale.setlocale(locale.LC_ALL, oldloc)
  File "Lib/test/test_format.py", line 444, in test_locale
    self.assertEqual(text.replace(sep, ''), '1234' + point + '5')
  File "Lib/test/test_format.py", line 437, in test_locale
    self.assertIn(sep, text)
AssertionError: ',' not found in '123456789'

----------------------------------------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions