mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
gh-59705: Fix solaris detection in test_threading.test_set_name() (#132012)
This commit is contained in:
parent
76f6b5e64a
commit
e8085319eb
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue