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:
Jack Jansen 2003-02-05 11:14:16 +00:00
parent 30a634e0a9
commit b86a2e8036
2 changed files with 4 additions and 4 deletions

View file

@ -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():