From: Brett Cannon Date: Tue, 15 Mar 2011 21:32:14 +0000 (-0400) Subject: Don't leave around a test symlink file. X-Git-Tag: v3.3.0a1~2902 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee877a08e92bb31258db536293b0d5f9b26b679b;p=thirdparty%2FPython%2Fcpython.git Don't leave around a test symlink file. --- diff --git a/Lib/test/support.py b/Lib/test/support.py index 98f333e28970..66d7f934370f 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -1465,9 +1465,11 @@ def can_symlink(): global _can_symlink if _can_symlink is not None: return _can_symlink + symlink_path = TESTFN + "can_symlink" try: - os.symlink(TESTFN, TESTFN + "can_symlink") + os.symlink(TESTFN, symlink_path) can = True + os.remove(symlink_path) except (OSError, NotImplementedError): can = False _can_symlink = can