Files
python-uncompyle6/test/simple_source/bug27+/06_raise.py
rocky df105fbfb2 Fixed one thing in Python 2.7 and break another.
We'll go with this until we get to a more serious refactoring.
2019-01-05 16:38:07 -05:00

23 lines
519 B
Python

# Bug in Python 2.7 is code creating a (useless) JUMP_ABSOLUTE to the instruction right after
# the "raise" which causes the
# RUNNABLE!
def testit(a, b):
if a:
if not b:
raise AssertionError("test JUMP_ABSOLUTE to next instruction")
def testit2(a, b):
if a:
if not b:
raise AssertionError("test with dead code after raise")
x = 10
testit(False, True)
testit(False, False)
testit(True, True)
testit2(False, True)
testit2(False, False)
testit2(True, True)