Commit d38b1e56 authored by Tres Seaver's avatar Tres Seaver

Test conflict resolution for pure-Python OO entities.

parent ad13669b
......@@ -145,7 +145,7 @@ class _BucketBase(_Base):
has_key = __contains__
def _p_resolveConflict(self, *states):
is_set = getattr(self, '_values', None) is not None
is_set = getattr(self, '_values', None) is None
buckets = []
for state in states:
......
......@@ -202,6 +202,13 @@ class OOBucketConflictTests(MappingConflictTestBase, unittest.TestCase):
return OOBucket
class OOBucketPyConflictTests(MappingConflictTestBase, unittest.TestCase):
def _getTargetClass(self):
from BTrees.OOBTree import OOBucketPy
return OOBucketPy
class OOSetConflictTests(SetConflictTestBase, unittest.TestCase):
def _getTargetClass(self):
......@@ -209,6 +216,13 @@ class OOSetConflictTests(SetConflictTestBase, unittest.TestCase):
return OOSet
class OOSetPyConflictTests(SetConflictTestBase, unittest.TestCase):
def _getTargetClass(self):
from BTrees.OOBTree import OOSetPy
return OOSetPy
class OOBTreeConflictTests(MappingConflictTestBase, unittest.TestCase):
def _getTargetClass(self):
......@@ -216,6 +230,13 @@ class OOBTreeConflictTests(MappingConflictTestBase, unittest.TestCase):
return OOBTree
class OOBTreePyConflictTests(MappingConflictTestBase, unittest.TestCase):
def _getTargetClass(self):
from BTrees.OOBTree import OOBTreePy
return OOBTreePy
class OOTreeSetConflictTests(SetConflictTestBase, unittest.TestCase):
def _getTargetClass(self):
......@@ -223,6 +244,13 @@ class OOTreeSetConflictTests(SetConflictTestBase, unittest.TestCase):
return OOTreeSet
class OOTreeSetPyConflictTests(SetConflictTestBase, unittest.TestCase):
def _getTargetClass(self):
from BTrees.OOBTree import OOTreeSetPy
return OOTreeSetPy
class OOModuleTest(ModuleTest, unittest.TestCase):
prefix = 'OO'
......@@ -277,8 +305,12 @@ def test_suite():
unittest.makeSuite(PureOO),
unittest.makeSuite(PureOOPy),
unittest.makeSuite(OOBucketConflictTests),
unittest.makeSuite(OOBucketPyConflictTests),
unittest.makeSuite(OOSetConflictTests),
unittest.makeSuite(OOSetPyConflictTests),
unittest.makeSuite(OOBTreeConflictTests),
unittest.makeSuite(OOBTreePyConflictTests),
unittest.makeSuite(OOTreeSetConflictTests),
unittest.makeSuite(OOTreeSetPyConflictTests),
unittest.makeSuite(OOModuleTest),
))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment