Skip to content

Commit bea8b1b

Browse files
committed
[3.11] pythongh-118201: Accomodate flaky behavior of os.sysconf on iOS (pythonGH-118453)
1 parent ea6809b commit bea8b1b

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
@@ -613,7 +613,8 @@ def fd_count():
613613
if hasattr(os, 'sysconf'):
614614
try:
615615
MAXFD = os.sysconf("SC_OPEN_MAX")
616-
except OSError:
616+
except (OSError, ValueError):
617+
# gh-118201: ValueError is raised intermittently on iOS
617618
pass
618619

619620
old_modes = None

Lib/test/test_os.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2286,6 +2286,7 @@ def test_fchown(self):
22862286
support.is_emscripten or support.is_wasi,
22872287
"musl libc issue on Emscripten/WASI, bpo-46390"
22882288
)
2289+
@unittest.skipIf(support.is_apple_mobile, "gh-118201: Test is flaky on iOS")
22892290
def test_fpathconf(self):
22902291
self.check(os.pathconf, "PC_NAME_MAX")
22912292
self.check(os.fpathconf, "PC_NAME_MAX")

0 commit comments

Comments
 (0)