We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 222c3a7 commit ceaf091Copy full SHA for ceaf091
Lib/test/test_capi/test_opt.py
@@ -3578,25 +3578,6 @@ def return_false():
3578
# v + 1 should be constant folded
3579
self.assertNotIn("_BINARY_OP", uops)
3580
3581
- def test_is_number_narrows_to_constant(self):
3582
- def f(n):
3583
- def return_1():
3584
- return 1
3585
-
3586
- hits = 0
3587
- v = return_1()
3588
- for i in range(n):
3589
- if v is 1:
3590
- hits += v + 1
3591
- return hits
3592
3593
- res, ex = self._run_with_optimizer(f, TIER2_THRESHOLD)
3594
- self.assertEqual(res, TIER2_THRESHOLD * 2)
3595
- self.assertIsNotNone(ex)
3596
3597
- # v + 1 should be constant folded
3598
- self.assertLessEqual(count_ops(ex, "_BINARY_OP_ADD_INT"), 1)
3599
3600
def test_for_iter_gen_frame(self):
3601
def f(n):
3602
for i in range(n):
0 commit comments