Skip to content

Commit 21336aa

Browse files
authored
gh-118201: Accomodate flaky behavior of os.sysconf on iOS (GH-118453)
1 parent 7d83f7b commit 21336aa

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/test/support/os_helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,8 @@ def fd_count():
632632
if hasattr(os, 'sysconf'):
633633
try:
634634
MAXFD = os.sysconf("SC_OPEN_MAX")
635-
except OSError:
635+
except (OSError, ValueError):
636+
# gh-118201: ValueError is raised intermittently on iOS
636637
pass
637638

638639
old_modes = None

Lib/test/test_os.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2365,6 +2365,7 @@ def test_fchown(self):
23652365
support.is_emscripten or support.is_wasi,
23662366
"musl libc issue on Emscripten/WASI, bpo-46390"
23672367
)
2368+
@unittest.skipIf(support.is_apple_mobile, "gh-118201: Test is flaky on iOS")
23682369
def test_fpathconf(self):
23692370
self.check(os.pathconf, "PC_NAME_MAX")
23702371
self.check(os.fpathconf, "PC_NAME_MAX")

0 commit comments

Comments
 (0)