[pypy-svn] r66583 - pypy/branch/io-lang/pypy/lang/io/test

david at codespeak.net david at codespeak.net
Fri Jul 24 15:05:54 CEST 2009


Author: david
Date: Fri Jul 24 15:05:54 2009
New Revision: 66583

Modified:
   pypy/branch/io-lang/pypy/lang/io/test/test_object.py
Log:
Test for improved Object for method

Modified: pypy/branch/io-lang/pypy/lang/io/test/test_object.py
==============================================================================
--- pypy/branch/io-lang/pypy/lang/io/test/test_object.py	(original)
+++ pypy/branch/io-lang/pypy/lang/io/test/test_object.py	Fri Jul 24 15:05:54 2009
@@ -75,6 +75,19 @@
    results = [t.value for t in res.items]
    results == [0, 3, 6, 9]
    
+def test_improved_object_for():
+    
+    inp = """a:= list();
+    x := 2
+    y := 11
+    for(x, 0, y - 1, x + 1, a append(x));
+    a"""
+    res, space = interpret(inp)
+
+    assert len(res.items) == 4
+    results = [t.value for t in res.items]
+    results == [0, 3, 6, 9]
+       
 def test_object_leaks():
     inp = """a:= list();
     for(x, 0, 10, 3, a append(x));



More information about the Pypy-commit mailing list