@@ -160,10 +160,7 @@ def check(self, method, expected_as_str, expected_as_str_source_version=None, up
160160 if update_try_except_infos is not None :
161161 update_try_except_infos (try_except_infos )
162162
163- if sys .version_info [:2 ] >= (3 , 11 ):
164- # From 3.11 onward, collect_try_except_info from bytecode returns [] (not implemented).
165- assert try_except_infos == []
166- else :
163+ if sys .version_info [:2 ] not in ((3 , 10 ), (3 , 11 ), (3 , 12 ), (3 , 13 )):
167164 assert str (try_except_infos ) == expected_as_str
168165 from _pydevd_bundle .pydevd_collect_bytecode_info import collect_try_except_info_from_source
169166
@@ -195,8 +192,7 @@ def test_collect_try_except_info(data_regression, pyfile):
195192 info = collect_try_except_info (method .__code__ , use_func_first_line = True )
196193 method_to_info [key ] = sorted (str (x ) for x in info )
197194
198- # Bytecode-based try/except collection returns [] from 3.11 onward (not implemented).
199- if sys .version_info [:2 ] < (3 , 11 ):
195+ if sys .version_info [:2 ] not in ((3 , 10 ), (3 , 11 ), (3 , 12 ), (3 , 13 )):
200196 data_regression .check (method_to_info )
201197
202198 data_regression .check (method_to_info_from_source )
0 commit comments