summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-02-05 11:14:16 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-02-05 11:14:16 (GMT)
commitb86a2e803616d17e3a4b6f408922140f863aa9b4 (patch)
tree1e36e33f76e850d67fa910457e05bcf1963185e6 /Lib
parent30a634e0a983f470e3663f93e182faed2128bbd9 (diff)
downloadcpython-b86a2e803616d17e3a4b6f408922140f863aa9b4.zip
cpython-b86a2e803616d17e3a4b6f408922140f863aa9b4.tar.gz
cpython-b86a2e803616d17e3a4b6f408922140f863aa9b4.tar.bz2
Use os.path.realpath() in stead of abspath(), so the tests don't fail if
we have a symlink somewhere in the TESTFN path.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_macfs.py4
-rw-r--r--Lib/test/test_macostools.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_macfs.py b/Lib/test/test_macfs.py
index 9c865d5..64235ec 100644
--- a/Lib/test/test_macfs.py
+++ b/Lib/test/test_macfs.py
@@ -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)
diff --git a/Lib/test/test_macostools.py b/Lib/test/test_macostools.py
index 268d9bb..f5abb6d 100644
--- a/Lib/test/test_macostools.py
+++ b/Lib/test/test_macostools.py
@@ -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():