https://github.com/python/cpython/commit/a1e057bdb459f5f639c05df94372c8588b4665e8
commit: a1e057bdb459f5f639c05df94372c8588b4665e8
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-06-25T13:59:33Z
summary:

[3.14] gh-152168: Don't skip `test_bigmem` if `_testcapi` is missing 
(GH-152171) (#152199)

(cherry picked from commit 6a82832a0bd12ff6154fcfcccc3b7b5644eab0e8)

Co-authored-by: Shahar Naveh <[email protected]>

files:
M Lib/test/test_bigmem.py

diff --git a/Lib/test/test_bigmem.py b/Lib/test/test_bigmem.py
index 6d0879ad65d53c..7f53379a952dfc 100644
--- a/Lib/test/test_bigmem.py
+++ b/Lib/test/test_bigmem.py
@@ -10,7 +10,6 @@
 
 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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to