Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
GH-137194 Fix requires_debug_ranges not to raise SkipTest when `_test…
…cpi` doesn't exist
  • Loading branch information
youknowone committed Jul 30, 2025
commit be72a79ba1a2de32ff2d30313e991c92b406129e
6 changes: 5 additions & 1 deletion Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,11 @@ def has_no_debug_ranges():
return not bool(config['code_debug_ranges'])

def requires_debug_ranges(reason='requires co_positions / debug_ranges'):
return unittest.skipIf(has_no_debug_ranges(), reason)
try:
skip = has_no_debug_ranges()
except unittest.SkipTest:
skip = True
Comment thread
serhiy-storchaka marked this conversation as resolved.
Comment thread
youknowone marked this conversation as resolved.
Outdated
return unittest.skipIf(skip, reason)


MS_WINDOWS = (sys.platform == 'win32')
Expand Down