mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Fix #9333. The symlink function is always available now, raising OSError
when the user doesn't hold the symbolic link privilege rather than hiding it.
This commit is contained in:
parent
baab9d0bf6
commit
3b4499c5c7
11 changed files with 55 additions and 46 deletions
|
@ -155,7 +155,7 @@ class PosixPathTest(unittest.TestCase):
|
|||
f.write(b"foo")
|
||||
f.close()
|
||||
self.assertIs(posixpath.islink(support.TESTFN + "1"), False)
|
||||
if hasattr(os, "symlink"):
|
||||
if support.can_symlink():
|
||||
os.symlink(support.TESTFN + "1", support.TESTFN + "2")
|
||||
self.assertIs(posixpath.islink(support.TESTFN + "2"), True)
|
||||
os.remove(support.TESTFN + "1")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue