Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r1603:f8215ea24895
Date: 2015-02-02 15:44 +0100
http://bitbucket.org/pypy/stmgc/changeset/f8215ea24895/

Log:    finalizer bug: found a test

diff --git a/c7/test/test_finalizer.py b/c7/test/test_finalizer.py
--- a/c7/test/test_finalizer.py
+++ b/c7/test/test_finalizer.py
@@ -176,12 +176,14 @@
 
     def test_finalizer_in_major_collection(self):
         self.start_transaction()
-        lp1 = stm_allocate_with_finalizer(48)
-        lp2 = stm_allocate_with_finalizer(48)
-        lp3 = stm_allocate_with_finalizer(48)
-        print lp1, lp2, lp3
-        stm_major_collect()
-        self.expect_finalized([lp1, lp2, lp3])
+        for repeat in range(2):
+            lp1 = stm_allocate_with_finalizer(48)
+            lp2 = stm_allocate_with_finalizer(48)
+            lp3 = stm_allocate_with_finalizer(48)
+            print repeat, lp1, lp2, lp3
+            self.expect_finalized([])
+            stm_major_collect()
+            self.expect_finalized([lp1, lp2, lp3])
 
     def test_finalizer_from_other_thread(self):
         self.start_transaction()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to