Skip to content

Commit 97f2aaa

Browse files
committed
Skip test on Android
1 parent 3773f30 commit 97f2aaa

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎Doc/library/tempfile.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ The module defines the following user-callable items:
213213
Files outside of the tree may have their permissions and file flags reset.
214214

215215
On systems where :data:`shutil.rmtree.avoids_symlink_attacks` is
216-
false, manipulating symbolic links during cleanup
216+
false, and on Android, manipulating symbolic links during cleanup
217217
may cause files outside of the tree to be removed.
218218

219219
.. audit-event:: tempfile.mkdtemp fullpath tempfile.TemporaryDirectory

‎Lib/test/test_tempfile.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2141,6 +2141,9 @@ def test_delete_false(self):
21412141
'regression test for supported platforms')
21422142
@unittest.skipIf(support.MS_WINDOWS, 'dirfd not used on Windows')
21432143
@unittest.skipIf(support.is_wasi, 'WASI has no chmod')
2144+
@unittest.skipIf(
2145+
sys.platform == "android",
2146+
"On Android, os.chmod doesn't support dir_fd until API level 23")
21442147
def test_cleanup_safe(self):
21452148
"""Verify that cleanup uses the safer code path"""
21462149
# This is a regression test. Feel free to add exceptions for new

0 commit comments

Comments
 (0)