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

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