mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Use os.path.realpath() in stead of abspath(), so the tests don't fail if
we have a symlink somewhere in the TESTFN path.
This commit is contained in:
parent
30a634e0a9
commit
b86a2e8036
2 changed files with 4 additions and 4 deletions
|
|
@ -21,11 +21,11 @@ class TestMacfs(unittest.TestCase):
|
|||
|
||||
def test_fsspec(self):
|
||||
fss = macfs.FSSpec(test_support.TESTFN)
|
||||
self.assertEqual(os.path.abspath(test_support.TESTFN), fss.as_pathname())
|
||||
self.assertEqual(os.path.realpath(test_support.TESTFN), fss.as_pathname())
|
||||
|
||||
def test_fsref(self):
|
||||
fsr = macfs.FSRef(test_support.TESTFN)
|
||||
self.assertEqual(os.path.abspath(test_support.TESTFN), fsr.as_pathname())
|
||||
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