From: Brett Cannon Date: Mon, 6 Dec 2004 06:13:59 +0000 (+0000) Subject: Don't have test_mkalias_relative run if sys.prefix does not exist. Backport of X-Git-Tag: v2.4.1c1~172 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=506f691379c190d71e74d80a532e8b7aa1d28479;p=thirdparty%2FPython%2Fcpython.git Don't have test_mkalias_relative run 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: