]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-142913: Revert adding test_replaced_interpreter (GH-144110)
authorPetr Viktorin <encukou@gmail.com>
Thu, 22 Jan 2026 09:40:34 +0000 (10:40 +0100)
committerGitHub <noreply@github.com>
Thu, 22 Jan 2026 09:40:34 +0000 (10:40 +0100)
This partially reverts commit 4d5a676aa0811563ea78ae58ef89cdc0295bf7ed
(GH-142911)

The removed test fails when re-run in --huntrleaks mode.

Lib/test/test_capi/test_misc.py

index c9c757857a8a5d0a9ed8023d9db233549660d7cf..3997acbdf846958e558504ba90035c8a96259ed2 100644 (file)
@@ -2857,24 +2857,6 @@ class Test_Pep523API(unittest.TestCase):
         names = ["func", "outer", "outer", "inner", "inner", "outer", "inner"]
         self.do_test(func, names)
 
-    def test_replaced_interpreter(self):
-        def inner():
-            yield 'abc'
-        def outer():
-            yield from inner()
-        def func():
-            list(outer())
-        _testinternalcapi.set_eval_frame_interp()
-        try:
-            func()
-        finally:
-            _testinternalcapi.set_eval_frame_default()
-
-        stats = _testinternalcapi.get_eval_frame_stats()
-
-        self.assertEqual(stats["resumes"], 5)
-        self.assertEqual(stats["loads"], 5)
-
 
 @unittest.skipUnless(support.Py_GIL_DISABLED, 'need Py_GIL_DISABLED')
 class TestPyThreadId(unittest.TestCase):