Skip to content

Commit d3e4907

Browse files
committed
Temp patch CPython gh-137195
python/cpython#137195
1 parent 57029f6 commit d3e4907

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/support/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,11 @@ def has_no_debug_ranges():
514514
return not bool(config['code_debug_ranges'])
515515

516516
def requires_debug_ranges(reason='requires co_positions / debug_ranges'):
517-
return unittest.skipIf(has_no_debug_ranges(), reason)
517+
try:
518+
skip = has_no_debug_ranges()
519+
except unittest.SkipTest:
520+
skip = True
521+
return unittest.skipIf(skip, reason)
518522

519523
@contextlib.contextmanager
520524
def suppress_immortalization(suppress=True):

0 commit comments

Comments
 (0)