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

arigo at codespeak.net arigo at codespeak.net
Wed Feb 13 17:58:22 CET 2008


Author: arigo
Date: Wed Feb 13 17:58:20 2008
New Revision: 51444

Modified:
   pypy/dist/pypy/rpython/memory/test/test_gc.py
Log:
We may not need all collections.  This should speed up the test a little.


Modified: pypy/dist/pypy/rpython/memory/test/test_gc.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/test/test_gc.py	(original)
+++ pypy/dist/pypy/rpython/memory/test/test_gc.py	Wed Feb 13 17:58:20 2008
@@ -430,6 +430,7 @@
             def __del__(self):
                 assert state.age[self.key] == -1
                 state.age[self.key] = state.time
+                state.progress = True
 
         def build_example(input):
             state.time = 0
@@ -447,7 +448,10 @@
                 input, components, strict = examples[i]
                 build_example(input)
                 while state.time < len(letters):
+                    state.progress = False
                     llop.gc__collect(lltype.Void)
+                    if not state.progress:
+                        break
                     state.time += 1
                 # check that all instances have been finalized
                 if -1 in state.age.values():



More information about the Pypy-commit mailing list