From 84eae4150311e84cfb7f49026b3dc884fe439f8a Mon Sep 17 00:00:00 2001 From: Yongtao Huang Date: Mon, 26 Jan 2026 16:32:32 +0800 Subject: [PATCH] Test: fix stale uops usage in test_capi: Recompute uops for `test_is_none` instead of reusing the previous test's value. Signed-off-by: Yongtao Huang --- Lib/test/test_capi/test_opt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_capi/test_opt.py b/Lib/test/test_capi/test_opt.py index 7808700f6a2346..a379d1be2f9bd3 100644 --- a/Lib/test/test_capi/test_opt.py +++ b/Lib/test/test_capi/test_opt.py @@ -3750,6 +3750,7 @@ def test_is_none(n): res, ex = self._run_with_optimizer(test_is_none, TIER2_THRESHOLD) self.assertEqual(res, True) self.assertIsNotNone(ex) + uops = get_opnames(ex) self.assertIn("_IS_OP", uops) self.assertIn("_POP_TOP_NOP", uops)