Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-81793: Skip tests for os.link(follow_links=) on Android
  • Loading branch information
serhiy-storchaka committed May 4, 2025
commit 4136847b0006e6814deeb7eb6c3d9e1cdd48e347
8 changes: 8 additions & 0 deletions Lib/test/test_posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -1549,6 +1549,10 @@ def test_link_follow_symlinks(self):
except NotImplementedError:
if os.link in os.supports_follow_symlinks or default_no_follow:
raise
except PermissionError:
if sys.platform == 'android':
self.skipTest('Android blocks follow_symlinks with SELinux')
raise
else:
self.addCleanup(os_helper.unlink, link)
self.assertEqual(posix.lstat(link), posix.lstat(symlink))
Expand All @@ -1561,6 +1565,10 @@ def test_link_follow_symlinks(self):
except NotImplementedError:
if os.link in os.supports_follow_symlinks or default_follow:
raise
except PermissionError:
if sys.platform == 'android':
self.skipTest('Android blocks follow_symlinks with SELinux')
raise
else:
self.addCleanup(os_helper.unlink, link)
self.assertEqual(posix.lstat(link), posix.lstat(orig))
Expand Down
Loading