Skip to content

Commit a645241

Browse files
committed
[3.10] pythongh-118201: Accomodate flaky behavior of os.sysconf on iOS (pythonGH-118453)
1 parent 6735e6b commit a645241

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
@@ -517,7 +517,8 @@ def fd_count():
517517
if hasattr(os, 'sysconf'):
518518
try:
519519
MAXFD = os.sysconf("SC_OPEN_MAX")
520-
except OSError:
520+
except (OSError, ValueError):
521+
# gh-118201: ValueError is raised intermittently on iOS
521522
pass
522523

523524
old_modes = None

Lib/test/test_os.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2183,6 +2183,7 @@ def test_fchown(self):
21832183
self.check(os.fchown, -1, -1)
21842184

21852185
@unittest.skipUnless(hasattr(os, 'fpathconf'), 'test needs os.fpathconf()')
2186+
@unittest.skipIf(support.is_apple_mobile, "gh-118201: Test is flaky on iOS")
21862187
def test_fpathconf(self):
21872188
self.check(os.pathconf, "PC_NAME_MAX")
21882189
self.check(os.fpathconf, "PC_NAME_MAX")

0 commit comments

Comments
 (0)