]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't have test_mkalias_relative exexute if sys.prefix does not exist.
authorBrett Cannon <bcannon@gmail.com>
Mon, 6 Dec 2004 06:19:24 +0000 (06:19 +0000)
committerBrett Cannon <bcannon@gmail.com>
Mon, 6 Dec 2004 06:19:24 +0000 (06:19 +0000)
Backport of fix for bug #1077302.

Lib/test/test_macostools.py

index 9ed2d81094e26e5c142b2aeec242433777d7192b..6327e985958c1a0cbc4328a6a527e7f5d7119464 100644 (file)
@@ -71,6 +71,8 @@ class TestMacostools(unittest.TestCase):
         self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN))
 
     def test_mkalias_relative(self):
+        if not os.path.exists(sys.prefix):
+            return
         try:
             os.unlink(TESTFN2)
         except: