aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2025-02-24 23:34:38 +0800
committerGitHub <noreply@github.com>2025-02-24 15:34:38 +0000
commit8a76eb846926384a48bb1997bbf5c162fe29fc5d (patch)
tree5aff18bfe0a1748b08d6d5a36c79da7f2c08f0fb /Lib/test/test_sys.py
parent7ed3dc6392613832f66c63507385b1da109cbf21 (diff)
downloadcpython-8a76eb846926384a48bb1997bbf5c162fe29fc5d.tar.gz
cpython-8a76eb846926384a48bb1997bbf5c162fe29fc5d.zip
gh-130384: Skip a test_getallocatedblocks test pre-condition on iOS. (GH-130385)
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 39857445a02..cc50f976072 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -1100,7 +1100,13 @@ class SysModuleTest(unittest.TestCase):
# code objects is a large fraction of the total number of
# references, this can cause the total number of allocated
# blocks to exceed the total number of references.
- if not support.Py_GIL_DISABLED:
+ #
+ # For some reason, iOS seems to trigger the "unlikely to happen"
+ # case reliably under CI conditions. It's not clear why; but as
+ # this test is checking the behavior of getallocatedblock()
+ # under garbage collection, we can skip this pre-condition check
+ # for now. See GH-130384.
+ if not support.Py_GIL_DISABLED and not support.is_apple_mobile:
self.assertLess(a, sys.gettotalrefcount())
except AttributeError:
# gettotalrefcount() not available