diff options
author | Brett Cannon <brett@python.org> | 2011-03-15 21:32:14 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2011-03-15 21:32:14 (GMT) |
commit | ee877a08e92bb31258db536293b0d5f9b26b679b (patch) | |
tree | 78c15d8d7fed6fd6dec0a2afb4f6dcccece980ba | |
parent | f434ba9e4ef5a68940757ba5e3527dd02fdb53ca (diff) | |
download | cpython-ee877a08e92bb31258db536293b0d5f9b26b679b.zip cpython-ee877a08e92bb31258db536293b0d5f9b26b679b.tar.gz cpython-ee877a08e92bb31258db536293b0d5f9b26b679b.tar.bz2 |
Don't leave around a test symlink file.
-rw-r--r-- | Lib/test/support.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py index 98f333e..66d7f93 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 |