Skip to content

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

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

Open
qingshi163 opened this issue May 13, 2023 · 1 comment
Open

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

qingshi163 opened this issue May 13, 2023 · 1 comment

Comments

@qingshi163
Copy link
Contributor

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'

----------------------------------------------------------------------
@DimitrisJim
Copy link
Member

Should be duplicate of #4613 since this also appears to fail due to the format(123456789, "n") call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants