gh-133677: Fix tests when running in non-UTF-8 locale (GH-133865)

This commit is contained in:
Serhiy Storchaka 2025-05-12 19:09:11 +03:00 committed by GitHub
parent d1533115ba
commit 14305a83d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 16 additions and 12 deletions

View file

@ -6973,7 +6973,7 @@ class TestProgName(TestCase):
def check_usage(self, expected, *args, **kwargs):
res = script_helper.assert_python_ok('-Xutf8', *args, '-h', **kwargs)
self.assertEqual(res.out.splitlines()[0].decode(),
self.assertEqual(os.fsdecode(res.out.splitlines()[0]),
f'usage: {expected} [-h]')
def test_script(self, compiled=False):