10000 GH-115727: Temporary fix of confidence score test. (GH-115728) · python/cpython@494739e · GitHub
[go: up one dir, main page]

Skip to content

Commit 494739e

Browse files
authored
GH-115727: Temporary fix of confidence score test. (GH-115728)
Temporary fix of confidence score test.
1 parent 7a8c3ed commit 494739e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Lib/test/test_capi/test_opt.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,9 @@ def testfunc(n):
554554
ex = get_first_executor(testfunc)
555555
self.assertIsNotNone(ex)
556556
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)
557+
#Since branch is 50/50 the trace could go either way.
558+
count = ops.count("_GUARD_IS_TRUE_POP") + ops.count("_GUARD_IS_FALSE_POP")
559+
self.assertLessEqual(count, 2)
561560

562561
class TestUopsOptimization(unittest.TestCase):
563562

0 commit comments

Comments
 (0)
0