(recorder)
| 2235 | @unittest.skipUnless(_testinternalcapi, "requires _testinternalcapi") |
| 2236 | def test_monitoring_already_opimized_loop(self): |
| 2237 | def test_func(recorder): |
| 2238 | set_events = sys.monitoring.set_events |
| 2239 | line = E.LINE |
| 2240 | i = 0 |
| 2241 | for i in range(_testinternalcapi.SPECIALIZATION_THRESHOLD + 51): |
| 2242 | # Turn on events without branching once i reaches _testinternalcapi.SPECIALIZATION_THRESHOLD. |
| 2243 | set_events(TEST_TOOL, line * int(i >= _testinternalcapi.SPECIALIZATION_THRESHOLD)) |
| 2244 | pass |
| 2245 | pass |
| 2246 | pass |
| 2247 | |
| 2248 | self.assertEqual(sys.monitoring._all_events(), {}) |
| 2249 | events = [] |
nothing calls this directly
no test coverage detected