GeezerVison is showing github.com — gh-130384: Skip a test_getallocatedblocks test pre-condition on iOS. … · python/cpython@8a76eb8
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: Lib/test/test_sys.py +7-1Lines changed: 7 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -1100,7 +1100,13 @@ def test_getallocatedblocks(self): |
1100 | 1100 | # code objects is a large fraction of the total number of |
1101 | 1101 | # references, this can cause the total number of allocated |
1102 | 1102 | # 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: |
1104 | 1110 | self.assertLess(a, sys.gettotalrefcount()) |
1105 | 1111 | except AttributeError: |
1106 | 1112 | # gettotalrefcount() not available |
|