]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-152168: Don't skip `test_bigmem` if `_testcapi` is missing (#152171)
authorShahar Naveh <50263213+ShaharNaveh@users.noreply.github.com>
Thu, 25 Jun 2026 13:30:49 +0000 (16:30 +0300)
committerGitHub <noreply@github.com>
Thu, 25 Jun 2026 13:30:49 +0000 (14:30 +0100)
Lib/test/test_bigmem.py

index 6d0879ad65d53c61ddae5accea0491e046c135b7..7f53379a952dfc16c82d64345683fad263295abc 100644 (file)
@@ -10,7 +10,6 @@ high memory limit to regrtest, with the -M option.
 
 from test import support
 from test.support import bigmemtest, _1G, _2G, _4G, import_helper
-_testcapi = import_helper.import_module('_testcapi')
 
 import unittest
 import operator
@@ -1264,6 +1263,7 @@ class ImmortalityTest(unittest.TestCase):
     def test_stickiness(self, size):
         """Check that immortality is "sticky", so that
            once an object is immortal it remains so."""
+        _testcapi = import_helper.import_module('_testcapi')
         if size < _2G:
             # Not enough memory to cause immortality on overflow
             return