[pypy-svn] r78202 - pypy/trunk/pypy/translator/c/test

afa at codespeak.net afa at codespeak.net
Fri Oct 22 14:12:02 CEST 2010


Author: afa
Date: Fri Oct 22 14:12:00 2010
New Revision: 78202

Modified:
   pypy/trunk/pypy/translator/c/test/test_typed.py
Log:
Show how variable calls to __exit__ confuse the annotator


Modified: pypy/trunk/pypy/translator/c/test/test_typed.py
==============================================================================
--- pypy/trunk/pypy/translator/c/test/test_typed.py	(original)
+++ pypy/trunk/pypy/translator/c/test/test_typed.py	Fri Oct 22 14:12:00 2010
@@ -838,15 +838,16 @@
                     state.append('raised')
                 state.append('release')
 
-        def func():
+        def func(n):
             try:
                 with C('hello') as c:
                     state.append(c.name)
-                    raise ValueError
+                    if 1:
+                        raise ValueError
             except ValueError:
                 pass
             return ', '.join(state)
-        f = self.getcompiled(func, [])
-        res = f()
+        f = self.getcompiled(func, [int])
+        res = f(1)
         assert res == 'acquire, hello, raised, release'
 



More information about the Pypy-commit mailing list