Skip to content

Commit 86ab7f1

Browse files
Fix a test
1 parent 7ab76a8 commit 86ab7f1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Lib/test/test_capi/test_opt.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,14 +1241,8 @@ class Bar:
12411241
pass
12421242

12431243
res, ex = self._run_with_optimizer(thing, Foo())
1244-
opnames = list(iter_opnames(ex))
1245-
self.assertIsNotNone(ex)
1246-
self.assertEqual(res, TIER2_THRESHOLD * 6 + 1)
1247-
call = opnames.index("_CALL_BUILTIN_FAST")
1248-
load_attr_top = opnames.index("_POP_TOP_LOAD_CONST_INLINE_BORROW", 0, call)
1249-
load_attr_bottom = opnames.index("_POP_TOP_LOAD_CONST_INLINE_BORROW", call)
1250-
self.assertEqual(opnames[:load_attr_top].count("_GUARD_TYPE_VERSION"), 1)
1251-
self.assertEqual(opnames[call:load_attr_bottom].count("_CHECK_VALIDITY"), 2)
1244+
# Cleaned up by the invalidation.
1245+
self.assertIsNone(ex)
12521246

12531247
def test_guard_type_version_removed_escaping(self):
12541248

0 commit comments

Comments
 (0)