Thanks to visit codestin.com Credit goes to github.com
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 a2bb8ad commit a2c5f24Copy full SHA for a2c5f24
Lib/test/test_capi/test_opt.py
@@ -554,10 +554,9 @@ def testfunc(n):
554
ex = get_first_executor(testfunc)
555
self.assertIsNotNone(ex)
556
ops = [opname for opname, _, _ in ex]
557
- count = ops.count("_GUARD_IS_TRUE_POP")
558
- # Because Each 'if' halves the score, the second branch is
559
- # too much already.
560
- self.assertEqual(count, 1)
+ #Since branch is 50/50 the trace could go either way.
+ count = ops.count("_GUARD_IS_TRUE_POP") + ops.count("_GUARD_IS_FALSE_POP")
+ self.assertLessEqual(count, 2)
561
562
class TestUopsOptimization(unittest.TestCase):
563
0 commit comments