From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sun, 26 Oct 2025 01:00:17 +0000 (+0000) Subject: Fix a test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86ab7f152a55a0d333654d0b321e582973cfa91a;p=thirdparty%2FPython%2Fcpython.git Fix a test --- diff --git a/Lib/test/test_capi/test_opt.py b/Lib/test/test_capi/test_opt.py index 9adbe75b2059..b702da532044 100644 --- a/Lib/test/test_capi/test_opt.py +++ b/Lib/test/test_capi/test_opt.py @@ -1241,14 +1241,8 @@ class TestUopsOptimization(unittest.TestCase): pass res, ex = self._run_with_optimizer(thing, Foo()) - opnames = list(iter_opnames(ex)) - self.assertIsNotNone(ex) - self.assertEqual(res, TIER2_THRESHOLD * 6 + 1) - call = opnames.index("_CALL_BUILTIN_FAST") - load_attr_top = opnames.index("_POP_TOP_LOAD_CONST_INLINE_BORROW", 0, call) - load_attr_bottom = opnames.index("_POP_TOP_LOAD_CONST_INLINE_BORROW", call) - self.assertEqual(opnames[:load_attr_top].count("_GUARD_TYPE_VERSION"), 1) - self.assertEqual(opnames[call:load_attr_bottom].count("_CHECK_VALIDITY"), 2) + # Cleaned up by the invalidation. + self.assertIsNone(ex) def test_guard_type_version_removed_escaping(self):