Author: Armin Rigo <[email protected]>
Branch: finalizer
Changeset: r1472:00b174b2900e
Date: 2014-10-16 09:35 +0200
http://bitbucket.org/pypy/stmgc/changeset/00b174b2900e/

Log:    passing 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
@@ -147,3 +147,23 @@
         stm_set_ref(lp1, 0, lp2)
         stm_major_collect()
         self.expect_finalized([lp3])
+
+    def test_finalizer_extra_transation(self):
+        self.start_transaction()
+        lp1 = stm_allocate_with_finalizer(32)
+        print lp1
+        self.push_root(lp1)
+        self.commit_transaction()
+
+        self.start_transaction()
+        lp1b = self.pop_root()
+        assert lp1b == lp1
+        self.expect_finalized([])
+        self.commit_transaction()
+        self.expect_finalized([])
+
+        self.start_transaction()
+        stm_major_collect()
+        self.expect_finalized([])
+        self.commit_transaction()
+        self.expect_finalized([lp1])
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to