Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r57297:82c5bddf6b1f
Date: 2012-09-06 19:17 +0200
http://bitbucket.org/pypy/pypy/changeset/82c5bddf6b1f/

Log:    add some gc_collect() before dereferencing a weakref which is
        supposed to be dead

diff --git a/lib-python/3.2/test/test_exceptions.py 
b/lib-python/3.2/test/test_exceptions.py
--- a/lib-python/3.2/test/test_exceptions.py
+++ b/lib-python/3.2/test/test_exceptions.py
@@ -440,6 +440,7 @@
         except MyException as e:
             pass
         obj = None
+        gc_collect()
         obj = wr()
         self.assertTrue(obj is None, "%s" % obj)
 
@@ -451,6 +452,7 @@
         except MyException:
             pass
         obj = None
+        gc_collect()
         obj = wr()
         self.assertTrue(obj is None, "%s" % obj)
 
@@ -462,6 +464,7 @@
         except:
             pass
         obj = None
+        gc_collect()
         obj = wr()
         self.assertTrue(obj is None, "%s" % obj)
 
@@ -474,6 +477,7 @@
             except:
                 break
         obj = None
+        gc_collect() # XXX it seems it's not enough
         obj = wr()
         self.assertTrue(obj is None, "%s" % obj)
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to