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

Temporary fix of confidence score test.
This commit is contained in:
Mark Shannon 2024-02-20 18:50:31 +00:00 committed by GitHub
parent 7a8c3ed43a
commit 494739e1f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -554,10 +554,9 @@ class TestUops(unittest.TestCase):
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):