File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2033,9 +2033,10 @@ def f(n):
20332033 self .assertEqual (res , TIER2_THRESHOLD )
20342034 self .assertIsNotNone (ex )
20352035 uops = get_opnames (ex )
2036- self .assertIn ("_BINARY_OP_SUBSCR_DICT_KNOWN_HASH" , uops )
2037- self .assertNotIn ("_GUARD_NOS_DICT_SUBSCRIPT" , uops )
2038- self .assertNotIn ("_GUARD_NOS_DICT_STORE_SUBSCRIPT" , uops )
2036+ self .assertEqual (uops .count ("_BINARY_OP_SUBSCR_DICT_KNOWN_HASH" ), 1 )
2037+ self .assertEqual (uops .count ("_STORE_SUBSCR_DICT_KNOWN_HASH" ), 1 )
2038+ self .assertEqual (uops .count ("_GUARD_NOS_DICT_SUBSCRIPT" ), 0 )
2039+ self .assertEqual (uops .count ("_GUARD_NOS_DICT_STORE_SUBSCRIPT" ), 0 )
20392040
20402041 def test_dict_subclass_subscr_with_override (self ):
20412042 class MyDict (dict ):
@@ -2053,7 +2054,7 @@ def f(n):
20532054 self .assertEqual (res , 42 * TIER2_THRESHOLD )
20542055 self .assertIsNotNone (ex )
20552056 uops = get_opnames (ex )
2056- self .assertNotIn ( "_BINARY_OP_SUBSCR_DICT" , uops )
2057+ self .assertEqual ( uops . count ( "_BINARY_OP_SUBSCR_INIT_CALL" ), 1 )
20572058
20582059 def test_remove_guard_for_known_type_list (self ):
20592060 def f (n ):
You can’t perform that action at this time.
0 commit comments