Files
python-uncompyle6/test/simple_source/bug25/04_try_except_else.py
rocky 535df1592e Another 3.6 control-flow bug...
and add source to some previous bytecode tests
2018-03-31 19:28:35 -04:00

19 lines
346 B
Python

# Bug found in 2.4 test_math.py
# Bug was turning last try/except/else into try/else
import math
def test_exceptions():
try:
x = math.exp(-1000000000)
except:
raise RuntimeError
x = 1
try:
x = math.sqrt(-1.0)
except ValueError:
return x
else:
raise RuntimeError
test_exceptions()