]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] GH-118447: Fix FreeBSD test failures. (GH-119170) (#119181)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 19 May 2024 16:22:51 +0000 (18:22 +0200)
committerGitHub <noreply@github.com>
Sun, 19 May 2024 16:22:51 +0000 (16:22 +0000)
GH-118447: Fix FreeBSD test failures. (GH-119170)

Apparently only macOS requires read permission to call `readlink()` on a
symlink.
(cherry picked from commit 4b7667172898d440c1931ae923446c6a5ef1765e)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Lib/test/test_posixpath.py

index 5c27b7bee8f60e1d4ff6d074a54560a0815433b5..238baed5efa26468920d94e60377193aca7b325b 100644 (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)