From: Petr Viktorin Date: Thu, 22 Jan 2026 09:40:34 +0000 (+0100) Subject: gh-142913: Revert adding test_replaced_interpreter (GH-144110) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e66171efa3ca6b334931f6f9437d08065751352;p=thirdparty%2FPython%2Fcpython.git gh-142913: Revert adding test_replaced_interpreter (GH-144110) This partially reverts commit 4d5a676aa0811563ea78ae58ef89cdc0295bf7ed (GH-142911) The removed test fails when re-run in --huntrleaks mode. --- diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py index c9c757857a8a..3997acbdf846 100644 --- a/Lib/test/test_capi/test_misc.py +++ b/Lib/test/test_capi/test_misc.py @@ -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):