[pypy-svn] r25293 - pypy/dist/pypy/rpython/ootypesystem/test
nik at codespeak.net
nik at codespeak.net
Tue Apr 4 15:47:38 CEST 2006
Author: nik
Date: Tue Apr 4 15:47:37 2006
New Revision: 25293
Modified:
pypy/dist/pypy/rpython/ootypesystem/test/test_oolist.py
Log:
a test to prove that exceptions actually work at RPython level
for ootypesystem.
Modified: pypy/dist/pypy/rpython/ootypesystem/test/test_oolist.py
==============================================================================
--- pypy/dist/pypy/rpython/ootypesystem/test/test_oolist.py (original)
+++ pypy/dist/pypy/rpython/ootypesystem/test/test_oolist.py Tue Apr 4 15:47:37 2006
@@ -51,3 +51,14 @@
res = interpret(f, [2], type_system="ootype")
assert res == 2
+ def test_getitem_exception(self):
+ def f(x):
+ l = []
+ l.append(x)
+ try:
+ return l[1]
+ except IndexError:
+ return -1
+ res = interpret(f, [2], type_system="ootype")
+ assert res == -1
+
More information about the Pypy-commit
mailing list