[pypy-svn] r12498 - pypy/dist/pypy/translator/test
pedronis at codespeak.net
pedronis at codespeak.net
Thu May 19 01:04:29 CEST 2005
Author: pedronis
Date: Thu May 19 01:04:28 2005
New Revision: 12498
Modified:
pypy/dist/pypy/translator/test/test_annrpython.py
Log:
tests related to the changes in rev 12425
Modified: pypy/dist/pypy/translator/test/test_annrpython.py
==============================================================================
--- pypy/dist/pypy/translator/test/test_annrpython.py (original)
+++ pypy/dist/pypy/translator/test/test_annrpython.py Thu May 19 01:04:28 2005
@@ -1002,6 +1002,28 @@
assert a.binding(et) == t
assert isinstance(a.binding(ev), annmodel.SomeInstance) and a.binding(ev).classdef.cls == Exception
+ def test_try_except_raise_finally1(self):
+ def h(): pass
+ def g(): pass
+ class X(Exception): pass
+ def f():
+ try:
+ try:
+ g()
+ except X:
+ h()
+ raise
+ finally:
+ h()
+ a = self.RPythonAnnotator()
+ a.build_types(f, [])
+ fg = a.translator.getflowgraph(f)
+ et, ev = fg.exceptblock.inputargs
+ t = annmodel.SomeObject()
+ t.knowntype = type
+ t.is_type_of = [ev]
+ assert a.binding(et) == t
+ assert isinstance(a.binding(ev), annmodel.SomeInstance) and a.binding(ev).classdef.cls == Exception
def g(n):
More information about the Pypy-commit
mailing list