mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -322,8 +322,7 @@ class MiscReadTest(CommonReadTest):
|
|||
|
||||
@unittest.skipUnless(hasattr(os, "link"),
|
||||
"Missing hardlink implementation")
|
||||
@unittest.skipUnless(hasattr(os, "symlink"),
|
||||
"Missing symlink implementation")
|
||||
@support.skip_unless_symlink
|
||||
def test_extract_hardlink(self):
|
||||
# Test hardlink extraction (e.g. bug #857297).
|
||||
tar = tarfile.open(tarname, errorlevel=1, encoding="iso8859-1")
|
||||
|
@ -841,8 +840,7 @@ class WriteTest(WriteTestBase):
|
|||
os.remove(target)
|
||||
os.remove(link)
|
||||
|
||||
@unittest.skipUnless(hasattr(os, "symlink"),
|
||||
"Missing symlink implementation")
|
||||
@support.skip_unless_symlink
|
||||
def test_symlink_size(self):
|
||||
path = os.path.join(TEMPDIR, "symlink")
|
||||
os.symlink("link_target", path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue