GH-118447: Fix FreeBSD test failures. (#119170)

Apparently only macOS requires read permission to call `readlink()` on a
symlink.
This commit is contained in:
Barney Gale 2024-05-19 16:39:00 +01:00 committed by GitHub
parent 5307f44fb9
commit 4b76671728
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -663,6 +663,7 @@ class PosixPathTest(unittest.TestCase):
@os_helper.skip_unless_symlink
@skip_if_ABSTFN_contains_backslash
@unittest.skipIf(os.chmod not in os.supports_follow_symlinks, "Can't set symlink permissions")
@unittest.skipIf(sys.platform != "darwin", "only macOS requires read permission to readlink()")
def test_realpath_unreadable_symlink(self):
try:
os.symlink(ABSTFN+"1", ABSTFN)