https://github.com/python/cpython/commit/494739e1f71f8e290a2c869d4f40f4ea36a045c2
commit: 494739e1f71f8e290a2c869d4f40f4ea36a045c2
branch: main
author: Mark Shannon <[email protected]>
committer: markshannon <[email protected]>
date: 2024-02-20T18:50:31Z
summary:
GH-115727: Temporary fix of confidence score test. (GH-115728)
Temporary fix of confidence score test.
files:
M Lib/test/test_capi/test_opt.py
diff --git a/Lib/test/test_capi/test_opt.py b/Lib/test/test_capi/test_opt.py
index 3ba38c77710b2b..d53d6a057aa872 100644
--- a/Lib/test/test_capi/test_opt.py
+++ b/Lib/test/test_capi/test_opt.py
@@ -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):
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]