Skip to content

Commit 78980f7

Browse files
committed
gh-136156: Skip test_tempfile.test_link_tmpfile() on Android
1 parent 6c81e8c commit 78980f7

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Lib/test/test_tempfile.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,9 +1611,13 @@ def test_link_tmpfile(self):
16111611
tmp.flush()
16121612
fd = tmp.fileno()
16131613

1614-
os.link(f'/proc/self/fd/{fd}',
1615-
filename,
1616-
follow_symlinks=True)
1614+
try:
1615+
os.link(f'/proc/self/fd/{fd}',
1616+
filename,
1617+
follow_symlinks=True)
1618+
except PermissionError as exc:
1619+
# gh-136156: link() fails with PermissionError on Android
1620+
self.skipTest(str(exc))
16171621
with open(filename) as fp:
16181622
self.assertEqual(fp.read(), "hello")
16191623

0 commit comments

Comments
 (0)