Skip to content

Commit 9ade563

Browse files
committed
[3.12] pythongh-118201: Accomodate flaky behavior of os.sysconf on iOS (pythonGH-118453)
1 parent dae5979 commit 9ade563

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎Lib/test/support/os_helper.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,8 @@ def fd_count():
615615
if hasattr(os, 'sysconf'):
616616
try:
617617
MAXFD = os.sysconf("SC_OPEN_MAX")
618-
except OSError:
618+
except (OSError, ValueError):
619+
# gh-118201: ValueError is raised intermittently on iOS
619620
pass
620621

621622
old_modes = None

‎Lib/test/test_os.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2372,6 +2372,7 @@ def test_fchown(self):
23722372
support.is_emscripten or support.is_wasi,
23732373
"musl libc issue on Emscripten/WASI, bpo-46390"
23742374
)
2375+
@unittest.skipIf(support.is_apple_mobile, "gh-118201: Test is flaky on iOS")
23752376
def test_fpathconf(self):
23762377
self.check(os.pathconf, "PC_NAME_MAX")
23772378
self.check(os.fpathconf, "PC_NAME_MAX")

0 commit comments

Comments
 (0)