GitLab will continue to be upgraded from 11.4.5-ce.0 on November 25th 2019 at 4.00pm (AEDT) to 5.00pm (AEDT) due to Critical Security Patch Availability. During the update, GitLab and Mattermost services will not be available.

Commit 9653a183 authored by qinsoon's avatar qinsoon

a RPython rethrow test

parent f0862526
......@@ -1495,6 +1495,34 @@ The light shines in the darkness, and the darkness has not overcome it.
assert res.returncode == 0, res.err
assert res.out == john1 + '\n'
def test_rpython_rethrow():
def main(argv):
array = [1, 2, 3, 0]
for i in array:
print i
ret = i
except IOError:
return ret
def my_rethrow(i):
except OSError:
raise IOError()
def my_throw(i):
if i != 0:
raise OSError()
res = run_boot_image(main, '/tmp/test_rpython_rethrow')
assert res.returncode == 0, res.err
assert res.out == '1\n2\n3\n0\n'
if __name__ == '__main__':
import argparse
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment