Commit 62ec61fb authored by Victor Stinner's avatar Victor Stinner

test.support: can_symlink() removes the temporary symbolic link

parent 5b52f957
......@@ -1487,11 +1487,14 @@ 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
except (OSError, NotImplementedError):
can = False
else:
os.remove(symlink_path)
_can_symlink = can
return can
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment