summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_capi/test_opt.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-03-05 15:06:00 (GMT)
committerGitHub <noreply@github.com>2024-03-05 15:06:00 (GMT)
commit0c81ce13602b88fd59f23f701ed8dc377d74e76e (patch)
treedbcf462118f71fa97906409414099cdd2b8ca241 /Lib/test/test_capi/test_opt.py
parentc91bdf86ef1cf9365b61a46aa2e51e5d1932b00a (diff)
downloadcpython-0c81ce13602b88fd59f23f701ed8dc377d74e76e.zip
cpython-0c81ce13602b88fd59f23f701ed8dc377d74e76e.tar.gz
cpython-0c81ce13602b88fd59f23f701ed8dc377d74e76e.tar.bz2
GH-115819: Eliminate Boolean guards when value is known (GH-116355)
Diffstat (limited to 'Lib/test/test_capi/test_opt.py')
-rw-r--r--Lib/test/test_capi/test_opt.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_capi/test_opt.py b/Lib/test/test_capi/test_opt.py
index a0a1922..b0859a3 100644
--- a/Lib/test/test_capi/test_opt.py
+++ b/Lib/test/test_capi/test_opt.py
@@ -331,7 +331,8 @@ class TestUops(unittest.TestCase):
ex = get_first_executor(testfunc)
self.assertIsNotNone(ex)
uops = get_opnames(ex)
- self.assertIn("_GUARD_IS_NOT_NONE_POP", uops)
+ self.assertNotIn("_GUARD_IS_NONE_POP", uops)
+ self.assertNotIn("_GUARD_IS_NOT_NONE_POP", uops)
def test_pop_jump_if_not_none(self):
def testfunc(a):
@@ -347,7 +348,8 @@ class TestUops(unittest.TestCase):
ex = get_first_executor(testfunc)
self.assertIsNotNone(ex)
uops = get_opnames(ex)
- self.assertIn("_GUARD_IS_NONE_POP", uops)
+ self.assertNotIn("_GUARD_IS_NONE_POP", uops)
+ self.assertNotIn("_GUARD_IS_NOT_NONE_POP", uops)
def test_pop_jump_if_true(self):
def testfunc(n):