Skip to content

Commit 044cbfe

Browse files
committed
wip
1 parent 02bddbb commit 044cbfe

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests_python/test_collect_bytecode_info.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ 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] not in ((3, 10), (3, 11), (3, 12), (3, 13)):
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:
164167
assert str(try_except_infos) == expected_as_str
165168
from _pydevd_bundle.pydevd_collect_bytecode_info import collect_try_except_info_from_source
166169

@@ -192,7 +195,8 @@ def test_collect_try_except_info(data_regression, pyfile):
192195
info = collect_try_except_info(method.__code__, use_func_first_line=True)
193196
method_to_info[key] = sorted(str(x) for x in info)
194197

195-
if sys.version_info[:2] not in ((3, 10), (3, 11), (3, 12), (3, 13)):
198+
# Bytecode-based try/except collection returns [] from 3.11 onward (not implemented).
199+
if sys.version_info[:2] < (3, 11):
196200
data_regression.check(method_to_info)
197201

198202
data_regression.check(method_to_info_from_source)

0 commit comments

Comments
 (0)