Skip to content

Commit 9a1bee5

Browse files
committed
Exit test early if not enough memory
1 parent 2a08194 commit 9a1bee5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_bigmem.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,9 @@ class ImmortalityTest(unittest.TestCase):
12641264
def test_stickiness(self, size):
12651265
"""Check that immortality is "sticky", so that
12661266
once an object is immortal it remains so."""
1267+
if size < _2G:
1268+
# Not enough memory to cause immortality on overflow
1269+
return
12671270
o1 = o2 = o3 = o4 = o5 = o6 = o7 = o8 = object()
12681271
l = [o1] * (size-20)
12691272
self.assertFalse(_testcapi.is_immortal(o1))

0 commit comments

Comments
 (0)