projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b52f95
)
test.support: can_symlink() removes the temporary symbolic link
author
Victor Stinner
<victor.stinner@haypocalc.com>
Tue, 7 Jun 2011 10:17:15 +0000
(12:17 +0200)
committer
Victor Stinner
<victor.stinner@haypocalc.com>
Tue, 7 Jun 2011 10:17:15 +0000
(12:17 +0200)
Lib/test/support.py
patch
|
blob
|
history
diff --git
a/Lib/test/support.py
b/Lib/test/support.py
index 2aedf24846ee4986d4dedffcba039dd9bc9cb981..b19c698181af9812bec7f7ef6527131183c6e7ff 100644
(file)
--- a/
Lib/test/support.py
+++ b/
Lib/test/support.py
@@
-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