Author: Armin Rigo <[email protected]>
Branch: c8-hashtable
Changeset: r1726:92ed176fe541
Date: 2015-03-12 15:46 +0100
http://bitbucket.org/pypy/stmgc/changeset/92ed176fe541/
Log: fix test
diff --git a/c8/test/test_hashtable.py b/c8/test/test_hashtable.py
--- a/c8/test/test_hashtable.py
+++ b/c8/test/test_hashtable.py
@@ -297,19 +297,27 @@
h = self.allocate_hashtable()
self.push_root(h)
self.commit_transaction()
+ #
+ self.start_transaction()
h = self.pop_root()
+ self.push_root(h)
+ tl0 = self.tls[self.current_thread]
+ htset(h, 10, stm_allocate(32), tl0)
#
+ self.switch(1)
self.start_transaction()
assert htlen(h) == 0
#
- self.switch(1)
- self.start_transaction()
- tl0 = self.tls[self.current_thread]
- htset(h, 10, stm_allocate(32), tl0)
- py.test.raises(Conflict, self.commit_transaction)
+ self.switch(0)
+ self.commit_transaction()
+ #
+ py.test.raises(Conflict, self.switch, 1)
#
self.switch(0)
+ self.start_transaction()
+ self.pop_root()
stm_major_collect() # to get rid of the hashtable object
+ self.commit_transaction()
def test_grow_without_conflict(self):
self.start_transaction()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit