WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.2% of users enabled 2FA.

Commit 9653a183 authored by qinsoon's avatar qinsoon
Browse files

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'
@may_spawn_proc
def test_rpython_rethrow():
def main(argv):
array = [1, 2, 3, 0]
for i in array:
print i
ret = i
try:
my_rethrow(i)
except IOError:
pass
return ret
def my_rethrow(i):
try:
my_throw(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