mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Try to fix failures on platforms that can't encode the test characters.
Skip the test if encoding fails.
This commit is contained in:
parent
5aa580f279
commit
43f0c27be7
1 changed files with 6 additions and 1 deletions
|
@ -888,7 +888,12 @@ class LinkTests(unittest.TestCase):
|
|||
bytes(self.file2, sys.getfilesystemencoding()))
|
||||
|
||||
def test_mbcs_name(self):
|
||||
self.file1 += "\u65e5\u672c"
|
||||
try:
|
||||
chars = os.fsencode("\u65e5\u672c")
|
||||
except UnicodeError:
|
||||
raise unittest.SkipTest("Unable to encode for this platform.")
|
||||
|
||||
self.file1 += chars
|
||||
self.file2 = self.file1 + "2"
|
||||
self._test_link(self.file1, self.file2)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue