File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1241,8 +1241,14 @@ class Bar:
12411241 pass
12421242
12431243 res , ex = self ._run_with_optimizer (thing , Foo ())
1244- # Cleaned up by the invalidation.
1245- self .assertIsNone (ex )
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 )
12461252
12471253 def test_guard_type_version_removed_escaping (self ):
12481254
You can’t perform that action at this time.
0 commit comments