Skip to content

Commit 8a76eb8

Browse files
authored
gh-130384: Skip a test_getallocatedblocks test pre-condition on iOS. (GH-130385)
1 parent 7ed3dc6 commit 8a76eb8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Lib/test/test_sys.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,13 @@ def test_getallocatedblocks(self):
11001100
# code objects is a large fraction of the total number of
11011101
# references, this can cause the total number of allocated
11021102
# blocks to exceed the total number of references.
1103-
if not support.Py_GIL_DISABLED:
1103+
#
1104+
# For some reason, iOS seems to trigger the "unlikely to happen"
1105+
# case reliably under CI conditions. It's not clear why; but as
1106+
# this test is checking the behavior of getallocatedblock()
1107+
# under garbage collection, we can skip this pre-condition check
1108+
# for now. See GH-130384.
1109+
if not support.Py_GIL_DISABLED and not support.is_apple_mobile:
11041110
self.assertLess(a, sys.gettotalrefcount())
11051111
except AttributeError:
11061112
# gettotalrefcount() not available

0 commit comments

Comments
 (0)