Skip to content

gh-130384: Skip a test_getallocatedblocks test pre-condition on iOS. #130385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Lib/test/test_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,13 @@ def test_getallocatedblocks(self):
# 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
Expand Down
Loading