mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28: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
|
@ -68,7 +68,7 @@ class TestMacostools(unittest.TestCase):
|
|||
pass
|
||||
macostools.mkalias(test_support.TESTFN, TESTFN2)
|
||||
fss, _, _ = macfs.ResolveAliasFile(TESTFN2)
|
||||
self.assertEqual(fss.as_pathname(), os.path.abspath(test_support.TESTFN))
|
||||
self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN))
|
||||
|
||||
def test_mkalias_relative(self):
|
||||
try:
|
||||
|
@ -77,7 +77,7 @@ class TestMacostools(unittest.TestCase):
|
|||
pass
|
||||
macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix)
|
||||
fss, _, _ = macfs.ResolveAliasFile(TESTFN2)
|
||||
self.assertEqual(fss.as_pathname(), os.path.abspath(test_support.TESTFN))
|
||||
self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN))
|
||||
|
||||
|
||||
def test_main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue