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

david at codespeak.net david at codespeak.net
Thu Jul 23 17:40:14 CEST 2009


Author: david
Date: Thu Jul 23 17:40:13 2009
New Revision: 66545

Modified:
   pypy/branch/io-lang/pypy/lang/io/test/test_object.py
Log:
Ensure Object for leaks the index variable

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	Thu Jul 23 17:40:13 2009
@@ -73,4 +73,12 @@
    
    assert len(res.items) == 4
    results = [t.value for t in res.items]
-   results == [0, 3, 6, 9]
\ No newline at end of file
+   results == [0, 3, 6, 9]
+   
+def test_object_leaks():
+    inp = """a:= list();
+    for(x, 0, 10, 3, a append(x));
+    x"""
+    res, _ = interpret(inp)
+
+    assert res.value == 9
\ No newline at end of file



More information about the Pypy-commit mailing list