gh-59705: Fix solaris detection in test_threading.test_set_name() (#132012)

This commit is contained in:
Jakub Kulík 2025-04-02 16:34:43 +02:00 committed by GitHub
parent 76f6b5e64a
commit e8085319eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2145,7 +2145,7 @@ class MiscTestCase(unittest.TestCase):
if os_helper.TESTFN_UNENCODABLE:
tests.append(os_helper.TESTFN_UNENCODABLE)
if sys.platform.startswith("solaris"):
if sys.platform.startswith("sunos"):
encoding = "utf-8"
else:
encoding = sys.getfilesystemencoding()
@ -2161,7 +2161,7 @@ class MiscTestCase(unittest.TestCase):
encoded = encoded.split(b'\0', 1)[0]
if truncate is not None:
encoded = encoded[:truncate]
if sys.platform.startswith("solaris"):
if sys.platform.startswith("sunos"):
expected = encoded.decode("utf-8", "surrogateescape")
else:
expected = os.fsdecode(encoded)