Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BTrees
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
BTrees
Commits
d38b1e56
Commit
d38b1e56
authored
Nov 12, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test conflict resolution for pure-Python OO entities.
parent
ad13669b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
BTrees/_base.py
BTrees/_base.py
+1
-1
BTrees/tests/test_OOBTree.py
BTrees/tests/test_OOBTree.py
+32
-0
No files found.
BTrees/_base.py
View file @
d38b1e56
...
...
@@ -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
:
...
...
BTrees/tests/test_OOBTree.py
View file @
d38b1e56
...
...
@@ -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
),
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment