From: Brett Cannon Date: Mon, 6 Dec 2004 06:19:24 +0000 (+0000) Subject: Don't have test_mkalias_relative exexute if sys.prefix does not exist. X-Git-Tag: v2.3.5c1~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=58a8a338857f90c11d1301f0a354a0777756d7c7;p=thirdparty%2FPython%2Fcpython.git Don't have test_mkalias_relative exexute if sys.prefix does not exist. Backport of fix for bug #1077302. --- diff --git a/Lib/test/test_macostools.py b/Lib/test/test_macostools.py index 9ed2d81094e2..6327e985958c 100644 --- a/Lib/test/test_macostools.py +++ b/Lib/test/test_macostools.py @@ -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: