[pypy-svn] r26899 - pypy/dist/pypy/translator/stackless/test

arigo at codespeak.net arigo at codespeak.net
Sat May 6 22:12:24 CEST 2006


Author: arigo
Date: Sat May  6 22:12:22 2006
New Revision: 26899

Modified:
   pypy/dist/pypy/translator/stackless/test/test_transform.py
Log:
(pedronis, arigo) Fix and test -- both in the same file :-)


Modified: pypy/dist/pypy/translator/stackless/test/test_transform.py
==============================================================================
--- pypy/dist/pypy/translator/stackless/test/test_transform.py	(original)
+++ pypy/dist/pypy/translator/stackless/test/test_transform.py	Sat May  6 22:12:22 2006
@@ -34,6 +34,12 @@
 
 from pypy.translator.stackless import code
 
+def test_nothing():
+    def fn(ignored):
+        return 21
+    res = llinterp_stackless_function(fn)
+    assert res == 21
+
 def test_simple_transform_llinterp():
     def check(x):
         if x:
@@ -155,11 +161,11 @@
     # helpers which can cause slp_main_loop to get re-annotated after
     # it is rtyped.  which is bad.
     unwind_def = bk.getuniqueclassdef(code.UnwindException)
-    #unwind_def.generalize_attr('frame_top',
-    #                           annmodel.SomePtr(lltype.Ptr(code.STATE_HEADER)))
     unwind_def.generalize_attr('frame_bottom',
                                annmodel.SomePtr(lltype.Ptr(code.STATE_HEADER)))
-    
+    attrdef = unwind_def.attrs['frame_bottom']
+    attrdef.readonly = False
+
     s_returnvar = annotator.build_types(fn, [s_list_of_strings])
     if not isinstance(s_returnvar, annmodel.SomeInteger):
         raise Exception, "this probably isn't going to work"



More information about the Pypy-commit mailing list