mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Backport CPython gh-137195
https://github.com/python/cpython/pull/137195
This commit is contained in:
1 parent
f32a5b105a
commit
36cc6d1945
1 file changed
+6
-1
Vendored
+6
-1
@@ -514,7 +514,12 @@ 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 as e:
|
||||
skip = True
|
||||
reason = e.args[0] if e.args else reason
|
||||
return unittest.skipIf(skip, reason)
|
||||
|
||||
@contextlib.contextmanager
|
||||
def suppress_immortalization(suppress=True):
|
||||
|
||||
Reference in new issue
Block a user