[pypy-svn] r28141 - in pypy/dist/pypy/rpython: . test

ac at codespeak.net ac at codespeak.net
Sat Jun 3 11:52:10 CEST 2006


Author: ac
Date: Sat Jun  3 11:52:09 2006
New Revision: 28141

Modified:
   pypy/dist/pypy/rpython/rgc.py
   pypy/dist/pypy/rpython/test/test_rgc.py
Log:
(cfbolz, arre) Fix annotation typo.

Modified: pypy/dist/pypy/rpython/rgc.py
==============================================================================
--- pypy/dist/pypy/rpython/rgc.py	(original)
+++ pypy/dist/pypy/rpython/rgc.py	Sat Jun  3 11:52:09 2006
@@ -100,7 +100,7 @@
 
     def compute_result_annotation(self):
         from pypy.annotation import model as annmodel
-        return annmodel.SomeImpossibleValue()
+        return annmodel.s_None
 
     def specialize_call(self, hop):
         return hop.genop('gc__collect', [], resulttype=hop.r_result)

Modified: pypy/dist/pypy/rpython/test/test_rgc.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rgc.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rgc.py	Sat Jun  3 11:52:09 2006
@@ -1,13 +1,19 @@
-from pypy.rpython.test.test_llinterp import gengraph
+from pypy.rpython.test.test_llinterp import gengraph, interpret
 from pypy.rpython import rgc # Force registration of gc.collect
 import gc
 
 def test_collect():
     def f():
-        gc.collect()
+        return gc.collect()
 
     t, typer, graph = gengraph(f, [])
     ops = list(graph.iterblockops())
     assert len(ops) == 1
     op = ops[0][1]
     assert op.opname == 'gc__collect'
+
+
+    res = interpret(f, [])
+    
+    assert res is None
+    



More information about the Pypy-commit mailing list