File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2201,18 +2201,18 @@ def test_call_builtin_o(self):
22012201 def testfunc (n ):
22022202 x = 0
22032203 for _ in range (n ):
2204- my_abs = abs
2205- y = my_abs (1 )
2204+ y = abs (1 )
22062205 x += y
22072206 return x
22082207
22092208 res , ex = self ._run_with_optimizer (testfunc , TIER2_THRESHOLD )
22102209 self .assertEqual (res , TIER2_THRESHOLD )
22112210 self .assertIsNotNone (ex )
22122211 uops = get_opnames (ex )
2212+ pop_tops = [opname for opname in iter_opnames (ex ) if opname == "_POP_TOP" ]
22132213 self .assertIn ("_CALL_BUILTIN_O" , uops )
2214- self .assertNotIn ("_POP_TOP" , uops )
22152214 self .assertIn ("_POP_TOP_NOP" , uops )
2215+ self .assertLessEqual (len (pop_tops ), 1 )
22162216
22172217 def test_call_method_descriptor_o (self ):
22182218 def testfunc (n ):
You can’t perform that action at this time.
0 commit comments