https://github.com/python/cpython/commit/21336aa12762ffe33bac83c7bd7992fcf42eee10
commit: 21336aa12762ffe33bac83c7bd7992fcf42eee10
branch: main
author: Russell Keith-Magee <[email protected]>
committer: ned-deily <[email protected]>
date: 2024-04-30T22:31:00-04:00
summary:
gh-118201: Accomodate flaky behavior of `os.sysconf` on iOS (GH-118453)
files:
M Lib/test/support/os_helper.py
M Lib/test/test_os.py
diff --git a/Lib/test/support/os_helper.py b/Lib/test/support/os_helper.py
index 8071c248b9b67e..891405943b78c5 100644
--- a/Lib/test/support/os_helper.py
+++ b/Lib/test/support/os_helper.py
@@ -632,7 +632,8 @@ def fd_count():
if hasattr(os, 'sysconf'):
try:
MAXFD = os.sysconf("SC_OPEN_MAX")
- except OSError:
+ except (OSError, ValueError):
+ # gh-118201: ValueError is raised intermittently on iOS
pass
old_modes = None
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 6a34f48f7873ee..eaa676673f8af0 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -2365,6 +2365,7 @@ def test_fchown(self):
support.is_emscripten or support.is_wasi,
"musl libc issue on Emscripten/WASI, bpo-46390"
)
+ @unittest.skipIf(support.is_apple_mobile, "gh-118201: Test is flaky on
iOS")
def test_fpathconf(self):
self.check(os.pathconf, "PC_NAME_MAX")
self.check(os.fpathconf, "PC_NAME_MAX")
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]