mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Allow unicode pathnames where FSRefs are expected. Fixes 696253.
This commit is contained in:
parent
d65ec37f46
commit
dded84802a
3 changed files with 15 additions and 4 deletions
|
@ -26,6 +26,11 @@ class TestMacfs(unittest.TestCase):
|
|||
def test_fsref(self):
|
||||
fsr = macfs.FSRef(test_support.TESTFN)
|
||||
self.assertEqual(os.path.realpath(test_support.TESTFN), fsr.as_pathname())
|
||||
|
||||
def test_fsref_unicode(self):
|
||||
testfn_unicode = unicode(test_support.TESTFN)
|
||||
fsr = macfs.FSRef(testfn_unicode)
|
||||
self.assertEqual(os.path.realpath(test_support.TESTFN), fsr.as_pathname())
|
||||
|
||||
def test_coercion(self):
|
||||
fss = macfs.FSSpec(test_support.TESTFN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue