GH-126599: Remove the "counter" optimizer/executor (GH-126853)

This commit is contained in:
Xuanteng Huang 2025-01-17 07:57:04 +08:00 committed by GitHub
parent 27494dd9ad
commit b44ff6d0df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 97 additions and 353 deletions

View file

@ -12,7 +12,6 @@ import unittest
import test.support
from test.support import requires_specialization_ft, script_helper
from test.support.import_helper import import_module
_testcapi = test.support.import_helper.import_module("_testcapi")
@ -2087,20 +2086,6 @@ class TestRegressions(MonitoringTestBase, unittest.TestCase):
class TestOptimizer(MonitoringTestBase, unittest.TestCase):
def setUp(self):
_testinternalcapi = import_module("_testinternalcapi")
if hasattr(_testinternalcapi, "get_optimizer"):
self.old_opt = _testinternalcapi.get_optimizer()
opt = _testinternalcapi.new_counter_optimizer()
_testinternalcapi.set_optimizer(opt)
super(TestOptimizer, self).setUp()
def tearDown(self):
super(TestOptimizer, self).tearDown()
import _testinternalcapi
if hasattr(_testinternalcapi, "get_optimizer"):
_testinternalcapi.set_optimizer(self.old_opt)
def test_for_loop(self):
def test_func(x):
i = 0