[pypy-commit] stmgc bag: one more passing test

arigo noreply at buildbot.pypy.org
Sat Jan 24 10:35:57 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: bag
Changeset: r1580:93786da12927
Date: 2015-01-24 10:36 +0100
http://bitbucket.org/pypy/stmgc/changeset/93786da12927/

Log:	one more passing test

diff --git a/c7/test/test_bag.py b/c7/test/test_bag.py
--- a/c7/test/test_bag.py
+++ b/c7/test/test_bag.py
@@ -67,3 +67,15 @@
             assert got == lp2
         py.test.raises(BagLooksEmpty, b_pop, q)
         py.test.raises(BagLooksEmpty, b_pop, q)
+
+    def test_large_push_pop(self):
+        self.start_transaction()
+        q = self.allocate_bag()
+        lps = [stm_allocate(16) for i in range(65)]
+        for lp in lps:
+            b_add(q, lp)
+        for lp in lps:
+            got = b_pop(q)
+            assert got == lp
+        py.test.raises(BagLooksEmpty, b_pop, q)
+        py.test.raises(BagLooksEmpty, b_pop, q)


More information about the pypy-commit mailing list