(self)
| 2220 | class TestOptimizer(MonitoringTestBase, unittest.TestCase): |
| 2221 | |
| 2222 | def test_for_loop(self): |
| 2223 | def test_func(x): |
| 2224 | i = 0 |
| 2225 | while i < x: |
| 2226 | i += 1 |
| 2227 | |
| 2228 | code = test_func.__code__ |
| 2229 | sys.monitoring.set_local_events(TEST_TOOL, code, E.PY_START) |
| 2230 | self.assertEqual(sys.monitoring.get_local_events(TEST_TOOL, code), E.PY_START) |
| 2231 | test_func(1000) |
| 2232 | sys.monitoring.set_local_events(TEST_TOOL, code, 0) |
| 2233 | self.assertEqual(sys.monitoring.get_local_events(TEST_TOOL, code), 0) |
| 2234 | |
| 2235 | class TestTier2Optimizer(CheckEvents): |
| 2236 |
nothing calls this directly
no test coverage detected