[pypy-svn] r63127 - pypy/trunk/pypy/module/_rawffi/test

pedronis at codespeak.net pedronis at codespeak.net
Fri Mar 20 12:04:14 CET 2009


Author: pedronis
Date: Fri Mar 20 12:04:14 2009
New Revision: 63127

Modified:
   pypy/trunk/pypy/module/_rawffi/test/test__rawffi.py
Log:
(iko, pedronis)

this seems to fix the test which was failing because things from before the test were alived and then collected during it.
collect more before the test



Modified: pypy/trunk/pypy/module/_rawffi/test/test__rawffi.py
==============================================================================
--- pypy/trunk/pypy/module/_rawffi/test/test__rawffi.py	(original)
+++ pypy/trunk/pypy/module/_rawffi/test/test__rawffi.py	Fri Mar 20 12:04:14 2009
@@ -866,13 +866,13 @@
     def test_structure_autofree(self):
         import gc, _rawffi
         gc.collect()
+        gc.collect()
         S = _rawffi.Structure([('x', 'i')])
         oldnum = _rawffi._num_of_allocated_objects()
         s = S(autofree=True)
         s.x = 3
         s = None
         gc.collect()
-        gc.collect()
         assert oldnum == _rawffi._num_of_allocated_objects()
 
     def test_array_autofree(self):



More information about the Pypy-commit mailing list