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 d00d39f commit faa2604Copy full SHA for faa2604
1 file changed
Lib/test/test_capi/test_opt.py
@@ -2201,18 +2201,18 @@ def test_call_builtin_o(self):
2201
def testfunc(n):
2202
x = 0
2203
for _ in range(n):
2204
- my_abs = abs
2205
- y = my_abs(1)
+ y = abs(1)
2206
x += y
2207
return x
2208
2209
res, ex = self._run_with_optimizer(testfunc, TIER2_THRESHOLD)
2210
self.assertEqual(res, TIER2_THRESHOLD)
2211
self.assertIsNotNone(ex)
2212
uops = get_opnames(ex)
+ pop_tops = [opname for opname in iter_opnames(ex) if opname == "_POP_TOP"]
2213
self.assertIn("_CALL_BUILTIN_O", uops)
2214
- self.assertNotIn("_POP_TOP", uops)
2215
self.assertIn("_POP_TOP_NOP", uops)
+ self.assertLessEqual(len(pop_tops), 1)
2216
2217
def test_call_method_descriptor_o(self):
2218
0 commit comments