[pypy-svn] r26501 - pypy/dist/pypy/rpython/test
sanxiyn at codespeak.net
sanxiyn at codespeak.net
Fri Apr 28 10:50:36 CEST 2006
Author: sanxiyn
Date: Fri Apr 28 10:50:33 2006
New Revision: 26501
Modified:
pypy/dist/pypy/rpython/test/test_rclass.py
Log:
Add a failing test_runtime_exception. Please help!
Modified: pypy/dist/pypy/rpython/test/test_rclass.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rclass.py (original)
+++ pypy/dist/pypy/rpython/test/test_rclass.py Fri Apr 28 10:50:33 2006
@@ -1,7 +1,8 @@
+import py
from pypy.translator.translator import TranslationContext, graphof
from pypy.rpython.lltypesystem.lltype import *
from pypy.rpython.ootypesystem import ootype
-from pypy.rpython.test.test_llinterp import interpret
+from pypy.rpython.test.test_llinterp import interpret, interpret_raises
from pypy.rpython.rarithmetic import intmask
@@ -99,6 +100,19 @@
res = interpret(dummyfn, [1], type_system=self.ts)
assert res == 4
+ def test_runtime_exception(self):
+ py.test.skip("God help us")
+ def pick(flag):
+ if flag:
+ return TypeError
+ else:
+ return ValueError
+ def f(flag):
+ ex = pick(flag)
+ raise ex()
+ interpret_raises(TypeError, f, [True], type_system=self.ts)
+ interpret_raises(ValueError, f, [False], type_system=self.ts)
+
def test_classattr_as_defaults(self):
def dummyfn():
x = Random()
More information about the Pypy-commit
mailing list