Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-115727: Temporary fix of confidence score test. #115728

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Lib/test/test_capi/test_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,9 @@ def testfunc(n):
ex = get_first_executor(testfunc)
self.assertIsNotNone(ex)
ops = [opname for opname, _, _ in ex]
count = ops.count("_GUARD_IS_TRUE_POP")
# Because Each 'if' halves the score, the second branch is
# too much already.
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)

class TestUopsOptimization(unittest.TestCase):

Expand Down
Loading