[pypy-svn] r47566 - pypy/dist/pypy/rpython/memory/test

cfbolz at codespeak.net cfbolz at codespeak.net
Thu Oct 18 22:43:41 CEST 2007


Author: cfbolz
Date: Thu Oct 18 22:43:40 2007
New Revision: 47566

Modified:
   pypy/dist/pypy/rpython/memory/test/test_transformed_gc.py
Log:
a GC tests involving instances. It fails for a strange reason on the
StacklessGC MarkSweep version.


Modified: pypy/dist/pypy/rpython/memory/test/test_transformed_gc.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/test/test_transformed_gc.py	(original)
+++ pypy/dist/pypy/rpython/memory/test/test_transformed_gc.py	Thu Oct 18 22:43:40 2007
@@ -91,6 +91,31 @@
         else:
             return -1     # xxx
 
+    def test_instances(self):
+        class A(object):
+            pass
+        class B(A):
+            def __init__(self, something):
+                self.something = something
+        def malloc_a_lot():
+            i = 0
+            first = None
+            while i < 10:
+                i += 1
+                a = somea = A()
+                a.last = first
+                first = a
+                j = 0
+                while j < 30:
+                    b = B(somea)
+                    b.last = first
+                    j += 1
+            return 0
+        run, statistics = self.runner(malloc_a_lot, statistics=True)
+        run([])
+        heap_size = self.heap_usage(statistics)
+
+
     def test_llinterp_lists(self):
         def malloc_a_lot():
             i = 0
@@ -659,6 +684,9 @@
             GC_PARAMS = {'start_heap_size': 4096 }
             root_stack_depth = 200
 
+    def test_instances(self):
+        py.test.skip("fails for a stupid reasons")
+
     def test_x_become(self):
         from pypy.rlib import objectmodel
         S = lltype.GcStruct("S", ('x', lltype.Signed))



More information about the Pypy-commit mailing list