summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2024-05-01 02:31:00 (GMT)
committerGitHub <noreply@github.com>2024-05-01 02:31:00 (GMT)
commit21336aa12762ffe33bac83c7bd7992fcf42eee10 (patch)
tree3a85c59ea1eb8e04152d5a0dec89ada044824af9
parent7d83f7bcc484145596bae1ff015fed0762da345d (diff)
downloadcpython-21336aa12762ffe33bac83c7bd7992fcf42eee10.zip
cpython-21336aa12762ffe33bac83c7bd7992fcf42eee10.tar.gz
cpython-21336aa12762ffe33bac83c7bd7992fcf42eee10.tar.bz2
gh-118201: Accomodate flaky behavior of `os.sysconf` on iOS (GH-118453)
-rw-r--r--Lib/test/support/os_helper.py3
-rw-r--r--Lib/test/test_os.py1
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/support/os_helper.py b/Lib/test/support/os_helper.py
index 8071c24..8914059 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 6a34f48..eaa6766 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -2365,6 +2365,7 @@ class TestInvalidFD(unittest.TestCase):
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")