[pypy-svn] r40014 - pypy/dist/pypy/translator/backendopt/test

antocuni at codespeak.net antocuni at codespeak.net
Wed Mar 7 11:44:31 CET 2007


Author: antocuni
Date: Wed Mar  7 11:44:30 2007
New Revision: 40014

Modified:
   pypy/dist/pypy/translator/backendopt/test/test_inline.py
Log:
A failing test for ootype



Modified: pypy/dist/pypy/translator/backendopt/test/test_inline.py
==============================================================================
--- pypy/dist/pypy/translator/backendopt/test/test_inline.py	(original)
+++ pypy/dist/pypy/translator/backendopt/test/test_inline.py	Wed Mar  7 11:44:30 2007
@@ -512,6 +512,20 @@
         assert x4() == 1
         py.test.raises(CannotInline, self.check_inline, x3, x4, [])
 
+    def test_list_iteration(self):
+        def f():
+            tot = 0
+            for item in [1,2,3]:
+                tot += item
+            return tot
+
+        eval_func, t = self.check_auto_inlining(f, [])
+        f_graph = graphof(t, f)
+        assert len(collect_called_graphs(f_graph, t)) == 0
+
+        result = eval_func([])
+        assert result == 6
+
 
 class TestInlineLLType(LLRtypeMixin, BaseTestInline):
 
@@ -636,3 +650,5 @@
         res = eval_func([])
         assert res == 42
 
+    def test_list_iteration(self):
+        py.test.skip('fixme!')


More information about the pypy-svn mailing list