mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-118201: Accomodate flaky behavior of os.sysconf
on iOS (GH-118453)
This commit is contained in:
parent
7d83f7bcc4
commit
21336aa127
2 changed files with 3 additions and 1 deletions
|
@ -632,7 +632,8 @@ def fd_count():
|
||||||
if hasattr(os, 'sysconf'):
|
if hasattr(os, 'sysconf'):
|
||||||
try:
|
try:
|
||||||
MAXFD = os.sysconf("SC_OPEN_MAX")
|
MAXFD = os.sysconf("SC_OPEN_MAX")
|
||||||
except OSError:
|
except (OSError, ValueError):
|
||||||
|
# gh-118201: ValueError is raised intermittently on iOS
|
||||||
pass
|
pass
|
||||||
|
|
||||||
old_modes = None
|
old_modes = None
|
||||||
|
|
|
@ -2365,6 +2365,7 @@ class TestInvalidFD(unittest.TestCase):
|
||||||
support.is_emscripten or support.is_wasi,
|
support.is_emscripten or support.is_wasi,
|
||||||
"musl libc issue on Emscripten/WASI, bpo-46390"
|
"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):
|
def test_fpathconf(self):
|
||||||
self.check(os.pathconf, "PC_NAME_MAX")
|
self.check(os.pathconf, "PC_NAME_MAX")
|
||||||
self.check(os.fpathconf, "PC_NAME_MAX")
|
self.check(os.fpathconf, "PC_NAME_MAX")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue