[pypy-svn] r48875 - pypy/branch/kill-remaining-suggested-primitives/pypy/translator/c/test

arigo at codespeak.net arigo at codespeak.net
Tue Nov 20 21:04:38 CET 2007


Author: arigo
Date: Tue Nov 20 21:04:37 2007
New Revision: 48875

Modified:
   pypy/branch/kill-remaining-suggested-primitives/pypy/translator/c/test/test_stackless.py
Log:
It's not really possible to test stack_too_big() directly.
We have other tests in test_typed that checks that we get
a RuntimeError in case of infinite recursion, so that will
have to be good enough.  The issue is that recursive functions
automatically contain a stack_too_big() check, which might
be triggered before our explicit one.


Modified: pypy/branch/kill-remaining-suggested-primitives/pypy/translator/c/test/test_stackless.py
==============================================================================
--- pypy/branch/kill-remaining-suggested-primitives/pypy/translator/c/test/test_stackless.py	(original)
+++ pypy/branch/kill-remaining-suggested-primitives/pypy/translator/c/test/test_stackless.py	Tue Nov 20 21:04:37 2007
@@ -135,30 +135,6 @@
         assert res == 10010255
 
 
-    def test_stack_too_big(self):
-        def f1():
-            return stack_too_big()
-        def f2():
-            return lst[1]()
-        def f3():
-            return lst[2]()
-        def f4():
-            return lst[3]()
-        def f5():
-            return lst[4]()
-        lst = [None,f1,f2,f3,f4,f5]
-
-        def f(n):
-            if lst[5]():
-                return n
-            return f(n)+1
-
-        def fn():
-            return f(0)
-        res = self.wrap_stackless_function(fn)
-        assert res > 500
-
-
     def test_stack_unwind(self):
         def f():
             stack_unwind()



More information about the Pypy-commit mailing list