[Checkins] SVN: BTrees/trunk/ Fix the one NastyConflict test runnable w/o ZODB.
Tres Seaver
cvs-admin at zope.org
Thu Oct 18 16:17:31 UTC 2012
Log message for revision 128065:
Fix the one NastyConflict test runnable w/o ZODB.
When ZODB is not around, we use a custom exception class for BTree-
internal conflicts (as opposed to those raised by the storage).
Changed:
_U BTrees/trunk/
U BTrees/trunk/BTrees/tests/testConflict.py
-=-
Modified: BTrees/trunk/BTrees/tests/testConflict.py
===================================================================
--- BTrees/trunk/BTrees/tests/testConflict.py 2012-10-18 15:13:59 UTC (rev 128064)
+++ BTrees/trunk/BTrees/tests/testConflict.py 2012-10-18 16:17:27 UTC (rev 128065)
@@ -802,7 +802,10 @@
# to decref a NULL pointer if conflict resolution was fed 3 empty
# buckets. http://collector.zope.org/Zope/553
def testThreeEmptyBucketsNoSegfault(self):
- from ZODB.POSException import ConflictError
+ # Note that the conflict is raised by our C extension, rather than
+ # indirectly via the storage, and hence is a more specialized type.
+ # This test therefore does not require ZODB.
+ from BTrees.Interfaces import BTreesConflictError
t = self._makeOne()
t[1] = 1
bucket = t._firstbucket
@@ -815,11 +818,11 @@
state3 is not state1)
self.assert_(state2 == state1 and
state3 == state1)
- self.assertRaises(ConflictError, bucket._p_resolveConflict,
+ self.assertRaises(BTreesConflictError, bucket._p_resolveConflict,
state1, state2, state3)
# When an empty BTree resolves conflicts, it computes the
# bucket state as None, so...
- self.assertRaises(ConflictError, bucket._p_resolveConflict,
+ self.assertRaises(BTreesConflictError, bucket._p_resolveConflict,
None, None, None)
@_skip_wo_ZODB
More information about the checkins
mailing list