mirror of
https://github.com/python/cpython.git
synced 2025-09-02 15:07:53 +00:00
GH-126599: Remove the "counter" optimizer/executor (GH-126853)
This commit is contained in:
parent
27494dd9ad
commit
b44ff6d0df
13 changed files with 97 additions and 353 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue