You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 08:49:51 +08:00
Fixed one thing in Python 2.7 and break another.
We'll go with this until we get to a more serious refactoring.
This commit is contained in:
22
test/simple_source/bug27+/06_raise.py
Normal file
22
test/simple_source/bug27+/06_raise.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# 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)
|
Reference in New Issue
Block a user