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
001d4c17
Commit
001d4c17
authored
Nov 13, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test pure-Python LO entities everywhere.
parent
416dc861
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
158 additions
and
0 deletions
+158
-0
BTrees/check.py
BTrees/check.py
+1
-0
BTrees/tests/test_LOBTree.py
BTrees/tests/test_LOBTree.py
+157
-0
No files found.
BTrees/check.py
View file @
001d4c17
...
...
@@ -43,6 +43,7 @@ from BTrees.LFBTree import LFBTreePy, LFBucketPy, LFSetPy, LFTreeSetPy
from
BTrees.LLBTree
import
LLBTree
,
LLBucket
,
LLSet
,
LLTreeSet
from
BTrees.LLBTree
import
LLBTreePy
,
LLBucketPy
,
LLSetPy
,
LLTreeSetPy
from
BTrees.LOBTree
import
LOBTree
,
LOBucket
,
LOSet
,
LOTreeSet
from
BTrees.LOBTree
import
LOBTreePy
,
LOBucketPy
,
LOSetPy
,
LOTreeSetPy
from
BTrees.OIBTree
import
OIBTree
,
OIBucket
,
OISet
,
OITreeSet
from
BTrees.OIBTree
import
OIBTreePy
,
OIBucketPy
,
OISetPy
,
OITreeSetPy
from
BTrees.OLBTree
import
OLBTree
,
OLBucket
,
OLSet
,
OLTreeSet
...
...
BTrees/tests/test_LOBTree.py
View file @
001d4c17
...
...
@@ -36,6 +36,13 @@ class LOBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return
LOBTree
class
LOBTreePyInternalKeyTest
(
InternalKeysMappingTest
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LOBTree
import
LOBTreePy
return
LOBTreePy
class
LOTreeSetInternalKeyTest
(
InternalKeysSetTest
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -43,6 +50,13 @@ class LOTreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
return
LOTreeSet
class
LOTreeSetPyInternalKeyTest
(
InternalKeysSetTest
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LOBTree
import
LOTreeSetPy
return
LOTreeSetPy
class
LOBucketTest
(
MappingBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -50,6 +64,13 @@ class LOBucketTest(MappingBase, unittest.TestCase):
return
LOBucket
class
LOBucketPyTest
(
MappingBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LOBTree
import
LOBucketPy
return
LOBucketPy
class
LOTreeSetTest
(
NormalSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -57,6 +78,13 @@ class LOTreeSetTest(NormalSetTests, unittest.TestCase):
return
LOTreeSet
class
LOTreeSetPyTest
(
NormalSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LOBTree
import
LOTreeSetPy
return
LOTreeSetPy
class
LOSetTest
(
ExtendedSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -64,6 +92,12 @@ class LOSetTest(ExtendedSetTests, unittest.TestCase):
return
LOSet
class
LOSetPyTest
(
ExtendedSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LOBTree
import
LOSetPy
return
LOSetPy
class
LOBTreeTest
(
BTreeTests
,
TestLongIntKeys
,
unittest
.
TestCase
):
...
...
@@ -72,6 +106,13 @@ class LOBTreeTest(BTreeTests, TestLongIntKeys, unittest.TestCase):
return
LOBTree
()
class
LOBTreePyTest
(
BTreeTests
,
TestLongIntKeys
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.LOBTree
import
LOBTreePy
return
LOBTreePy
()
class
TestLOSets
(
I_SetsBase
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
...
...
@@ -79,6 +120,13 @@ class TestLOSets(I_SetsBase, unittest.TestCase):
return
LOSet
()
class
TestLOSetsPy
(
I_SetsBase
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.LOBTree
import
LOSetPy
return
LOSetPy
()
class
TestLOTreeSets
(
I_SetsBase
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
...
...
@@ -86,37 +134,81 @@ class TestLOTreeSets(I_SetsBase, unittest.TestCase):
return
LOTreeSet
()
class
TestLOTreeSetsPy
(
I_SetsBase
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.LOBTree
import
LOTreeSetPy
return
LOTreeSetPy
()
class
TestLOMultiUnion
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.LOBTree
import
multiunion
return
multiunion
(
*
args
)
def
union
(
self
,
*
args
):
from
BTrees.LOBTree
import
union
return
union
(
*
args
)
def
mkset
(
self
,
*
args
):
from
BTrees.LOBTree
import
LOSet
as
mkset
return
mkset
(
*
args
)
def
mktreeset
(
self
,
*
args
):
from
BTrees.LOBTree
import
LOTreeSet
as
mktreeset
return
mktreeset
(
*
args
)
def
mkbucket
(
self
,
*
args
):
from
BTrees.LOBTree
import
LOBucket
as
mkbucket
return
mkbucket
(
*
args
)
def
mkbtree
(
self
,
*
args
):
from
BTrees.LOBTree
import
LOBTree
as
mkbtree
return
mkbtree
(
*
args
)
class
TestLOMultiUnionPy
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.LOBTree
import
multiunionPy
return
multiunionPy
(
*
args
)
def
union
(
self
,
*
args
):
from
BTrees.LOBTree
import
unionPy
return
unionPy
(
*
args
)
def
mkset
(
self
,
*
args
):
from
BTrees.LOBTree
import
LOSetPy
as
mkset
return
mkset
(
*
args
)
def
mktreeset
(
self
,
*
args
):
from
BTrees.LOBTree
import
LOTreeSetPy
as
mktreeset
return
mktreeset
(
*
args
)
def
mkbucket
(
self
,
*
args
):
from
BTrees.LOBTree
import
LOBucketPy
as
mkbucket
return
mkbucket
(
*
args
)
def
mkbtree
(
self
,
*
args
):
from
BTrees.LOBTree
import
LOBTreePy
as
mkbtree
return
mkbtree
(
*
args
)
class
PureLO
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.LOBTree
import
union
return
union
(
*
args
)
def
intersection
(
self
,
*
args
):
from
BTrees.LOBTree
import
intersection
return
intersection
(
*
args
)
def
difference
(
self
,
*
args
):
from
BTrees.LOBTree
import
difference
return
difference
(
*
args
)
def
builders
(
self
):
from
BTrees.LOBTree
import
LOBTree
from
BTrees.LOBTree
import
LOBucket
...
...
@@ -125,6 +217,29 @@ class PureLO(SetResult, unittest.TestCase):
return
LOSet
,
LOTreeSet
,
makeBuilder
(
LOBTree
),
makeBuilder
(
LOBucket
)
class
PureLOPy
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.LOBTree
import
unionPy
return
unionPy
(
*
args
)
def
intersection
(
self
,
*
args
):
from
BTrees.LOBTree
import
intersectionPy
return
intersectionPy
(
*
args
)
def
difference
(
self
,
*
args
):
from
BTrees.LOBTree
import
differencePy
return
differencePy
(
*
args
)
def
builders
(
self
):
from
BTrees.LOBTree
import
LOBTreePy
from
BTrees.LOBTree
import
LOBucketPy
from
BTrees.LOBTree
import
LOTreeSetPy
from
BTrees.LOBTree
import
LOSetPy
return
(
LOSetPy
,
LOTreeSetPy
,
makeBuilder
(
LOBTreePy
),
makeBuilder
(
LOBucketPy
))
class
LOBTreeConflictTests
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -132,6 +247,13 @@ class LOBTreeConflictTests(MappingConflictTestBase, unittest.TestCase):
return
LOBTree
class
LOBTreeConflictTestsPy
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LOBTree
import
LOBTreePy
return
LOBTreePy
class
LOBucketConflictTests
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -139,6 +261,13 @@ class LOBucketConflictTests(MappingConflictTestBase, unittest.TestCase):
return
LOBucket
class
LOBucketConflictTestsPy
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LOBTree
import
LOBucketPy
return
LOBucketPy
class
LOTreeSetConflictTests
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -146,6 +275,13 @@ class LOTreeSetConflictTests(SetConflictTestBase, unittest.TestCase):
return
LOTreeSet
class
LOTreeSetConflictTestsPy
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LOBTree
import
LOTreeSetPy
return
LOTreeSetPy
class
LOSetConflictTests
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -153,6 +289,13 @@ class LOSetConflictTests(SetConflictTestBase, unittest.TestCase):
return
LOSet
class
LOSetConflictTestsPy
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LOBTree
import
LOSetPy
return
LOSetPy
class
LOModuleTest
(
ModuleTest
,
unittest
.
TestCase
):
prefix
=
'LO'
...
...
@@ -185,18 +328,32 @@ class LOModuleTest(ModuleTest, unittest.TestCase):
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
LOBTreeInternalKeyTest
),
unittest
.
makeSuite
(
LOBTreePyInternalKeyTest
),
unittest
.
makeSuite
(
LOTreeSetInternalKeyTest
),
unittest
.
makeSuite
(
LOTreeSetPyInternalKeyTest
),
unittest
.
makeSuite
(
LOBucketTest
),
unittest
.
makeSuite
(
LOBucketPyTest
),
unittest
.
makeSuite
(
LOTreeSetTest
),
unittest
.
makeSuite
(
LOTreeSetPyTest
),
unittest
.
makeSuite
(
LOSetTest
),
unittest
.
makeSuite
(
LOSetPyTest
),
unittest
.
makeSuite
(
LOBTreeTest
),
unittest
.
makeSuite
(
LOBTreePyTest
),
unittest
.
makeSuite
(
TestLOSets
),
unittest
.
makeSuite
(
TestLOSetsPy
),
unittest
.
makeSuite
(
TestLOTreeSets
),
unittest
.
makeSuite
(
TestLOTreeSetsPy
),
unittest
.
makeSuite
(
TestLOMultiUnion
),
unittest
.
makeSuite
(
TestLOMultiUnionPy
),
unittest
.
makeSuite
(
PureLO
),
unittest
.
makeSuite
(
PureLOPy
),
unittest
.
makeSuite
(
LOBTreeConflictTests
),
unittest
.
makeSuite
(
LOBTreeConflictTestsPy
),
unittest
.
makeSuite
(
LOBucketConflictTests
),
unittest
.
makeSuite
(
LOBucketConflictTestsPy
),
unittest
.
makeSuite
(
LOTreeSetConflictTests
),
unittest
.
makeSuite
(
LOTreeSetConflictTestsPy
),
unittest
.
makeSuite
(
LOSetConflictTests
),
unittest
.
makeSuite
(
LOSetConflictTestsPy
),
unittest
.
makeSuite
(
LOModuleTest
),
))
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