Skip to content

Commit 16744e1

Browse files
committed
Override reason
1 parent be72a79 commit 16744e1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/test/support/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,9 @@ def has_no_debug_ranges():
546546
def requires_debug_ranges(reason='requires co_positions / debug_ranges'):
547547
try:
548548
skip = has_no_debug_ranges()
549-
except unittest.SkipTest:
549+
except unittest.SkipTest as e:
550550
skip = True
551+
reason = e.args[0] if e.args else reason
551552
return unittest.skipIf(skip, reason)
552553

553554

0 commit comments

Comments
 (0)