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
c9c18181
Commit
c9c18181
authored
Nov 13, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test pure-Python LF entities everywhere.
parent
753416e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
154 additions
and
8 deletions
+154
-8
BTrees/check.py
BTrees/check.py
+1
-0
BTrees/tests/test_LFBTree.py
BTrees/tests/test_LFBTree.py
+153
-8
No files found.
BTrees/check.py
View file @
c9c18181
...
...
@@ -39,6 +39,7 @@ from BTrees.IIBTree import IIBTreePy, IIBucketPy, IISetPy, IITreeSetPy
from
BTrees.IOBTree
import
IOBTree
,
IOBucket
,
IOSet
,
IOTreeSet
from
BTrees.IOBTree
import
IOBTreePy
,
IOBucketPy
,
IOSetPy
,
IOTreeSetPy
from
BTrees.LFBTree
import
LFBTree
,
LFBucket
,
LFSet
,
LFTreeSet
from
BTrees.LFBTree
import
LFBTreePy
,
LFBucketPy
,
LFSetPy
,
LFTreeSetPy
from
BTrees.LLBTree
import
LLBTree
,
LLBucket
,
LLSet
,
LLTreeSet
from
BTrees.LOBTree
import
LOBTree
,
LOBucket
,
LOSet
,
LOTreeSet
from
BTrees.OIBTree
import
OIBTree
,
OIBucket
,
OISet
,
OITreeSet
...
...
BTrees/tests/test_LFBTree.py
View file @
c9c18181
...
...
@@ -35,6 +35,13 @@ class LFBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return
LFBTree
class
LFBTreePyInternalKeyTest
(
InternalKeysMappingTest
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LFBTree
import
LFBTreePy
return
LFBTreePy
class
LFTreeSetInternalKeyTest
(
InternalKeysSetTest
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -42,6 +49,13 @@ class LFTreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
return
LFTreeSet
class
LFTreeSetPyInternalKeyTest
(
InternalKeysSetTest
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LFBTree
import
LFTreeSetPy
return
LFTreeSetPy
class
LFBucketTest
(
MappingBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -49,6 +63,13 @@ class LFBucketTest(MappingBase, unittest.TestCase):
return
LFBucket
class
LFBucketPyTest
(
MappingBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LFBTree
import
LFBucketPy
return
LFBucketPy
class
LFTreeSetTest
(
NormalSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -56,6 +77,13 @@ class LFTreeSetTest(NormalSetTests, unittest.TestCase):
return
LFTreeSet
class
LFTreeSetPyTest
(
NormalSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LFBTree
import
LFTreeSetPy
return
LFTreeSetPy
class
LFSetTest
(
ExtendedSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -63,6 +91,13 @@ class LFSetTest(ExtendedSetTests, unittest.TestCase):
return
LFSet
class
LFSetPyTest
(
ExtendedSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LFBTree
import
LFSetPy
return
LFSetPy
class
LFBTreeTest
(
BTreeTests
,
TestLongIntKeys
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
...
...
@@ -73,37 +108,84 @@ class LFBTreeTest(BTreeTests, TestLongIntKeys, unittest.TestCase):
return
0.5
,
1.5
class
LFBTreePyTest
(
BTreeTests
,
TestLongIntKeys
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.LFBTree
import
LFBTreePy
return
LFBTreePy
()
def
getTwoValues
(
self
):
return
0.5
,
1.5
class
TestLFMultiUnion
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.LFBTree
import
multiunion
return
multiunion
(
*
args
)
from
BTrees.LFBTree
import
multiunionPy
return
multiunionPy
(
*
args
)
def
union
(
self
,
*
args
):
from
BTrees.LFBTree
import
union
return
union
(
*
args
)
from
BTrees.LFBTree
import
unionPy
return
unionPy
(
*
args
)
def
mkset
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFSet
as
mkset
from
BTrees.LFBTree
import
LFSet
Py
as
mkset
return
mkset
(
*
args
)
def
mktreeset
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFTreeSet
as
mktreeset
from
BTrees.LFBTree
import
LFTreeSet
Py
as
mktreeset
return
mktreeset
(
*
args
)
def
mkbucket
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFBucket
as
mkbucket
from
BTrees.LFBTree
import
LFBucket
Py
as
mkbucket
return
mkbucket
(
*
args
)
def
mkbtree
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFBTree
as
mkbtree
from
BTrees.LFBTree
import
LFBTreePy
as
mkbtree
return
mkbtree
(
*
args
)
class
TestLFMultiUnionPy
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.LFBTree
import
multiunionPy
return
multiunionPy
(
*
args
)
def
union
(
self
,
*
args
):
from
BTrees.LFBTree
import
unionPy
return
unionPy
(
*
args
)
def
mkset
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFSetPy
as
mkset
return
mkset
(
*
args
)
def
mktreeset
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFTreeSetPy
as
mktreeset
return
mktreeset
(
*
args
)
def
mkbucket
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFBucketPy
as
mkbucket
return
mkbucket
(
*
args
)
def
mkbtree
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFBTreePy
as
mkbtree
return
mkbtree
(
*
args
)
class
PureLF
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.LFBTree
import
union
return
union
(
*
args
)
def
intersection
(
self
,
*
args
):
from
BTrees.LFBTree
import
intersection
return
intersection
(
*
args
)
def
difference
(
self
,
*
args
):
from
BTrees.LFBTree
import
difference
return
difference
(
*
args
)
def
builders
(
self
):
from
BTrees.LFBTree
import
LFBTree
from
BTrees.LFBTree
import
LFBucket
...
...
@@ -112,6 +194,29 @@ class PureLF(SetResult, unittest.TestCase):
return
LFSet
,
LFTreeSet
,
makeBuilder
(
LFBTree
),
makeBuilder
(
LFBucket
)
class
PureLFPy
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.LFBTree
import
unionPy
return
unionPy
(
*
args
)
def
intersection
(
self
,
*
args
):
from
BTrees.LFBTree
import
intersectionPy
return
intersectionPy
(
*
args
)
def
difference
(
self
,
*
args
):
from
BTrees.LFBTree
import
differencePy
return
differencePy
(
*
args
)
def
builders
(
self
):
from
BTrees.LFBTree
import
LFBTreePy
from
BTrees.LFBTree
import
LFBucketPy
from
BTrees.LFBTree
import
LFTreeSetPy
from
BTrees.LFBTree
import
LFSetPy
return
(
LFSetPy
,
LFTreeSetPy
,
makeBuilder
(
LFBTreePy
),
makeBuilder
(
LFBucketPy
))
class
LFBTreeConflictTests
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -119,6 +224,13 @@ class LFBTreeConflictTests(MappingConflictTestBase, unittest.TestCase):
return
LFBTree
class
LFBTreeConflictTestsPy
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LFBTree
import
LFBTreePy
return
LFBTreePy
class
LFBucketConflictTests
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -126,6 +238,13 @@ class LFBucketConflictTests(MappingConflictTestBase, unittest.TestCase):
return
LFBucket
class
LFBucketConflictTestsPy
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LFBTree
import
LFBucketPy
return
LFBucketPy
class
LFTreeSetConflictTests
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -133,6 +252,13 @@ class LFTreeSetConflictTests(SetConflictTestBase, unittest.TestCase):
return
LFTreeSet
class
LFTreeSetConflictTestsPy
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LFBTree
import
LFTreeSetPy
return
LFTreeSetPy
class
LFSetConflictTests
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -140,6 +266,13 @@ class LFSetConflictTests(SetConflictTestBase, unittest.TestCase):
return
LFSet
class
LFSetConflictTestsPy
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.LFBTree
import
LFSetPy
return
LFSetPy
class
LFModuleTest
(
ModuleTest
,
unittest
.
TestCase
):
prefix
=
'LF'
...
...
@@ -156,16 +289,28 @@ class LFModuleTest(ModuleTest, unittest.TestCase):
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
LFBTreeInternalKeyTest
),
unittest
.
makeSuite
(
LFBTreePyInternalKeyTest
),
unittest
.
makeSuite
(
LFTreeSetInternalKeyTest
),
unittest
.
makeSuite
(
LFTreeSetPyInternalKeyTest
),
unittest
.
makeSuite
(
LFBucketTest
),
unittest
.
makeSuite
(
LFBucketPyTest
),
unittest
.
makeSuite
(
LFTreeSetTest
),
unittest
.
makeSuite
(
LFTreeSetPyTest
),
unittest
.
makeSuite
(
LFSetTest
),
unittest
.
makeSuite
(
LFSetPyTest
),
unittest
.
makeSuite
(
LFBTreeTest
),
unittest
.
makeSuite
(
LFBTreePyTest
),
unittest
.
makeSuite
(
TestLFMultiUnion
),
unittest
.
makeSuite
(
TestLFMultiUnionPy
),
unittest
.
makeSuite
(
PureLF
),
unittest
.
makeSuite
(
PureLFPy
),
unittest
.
makeSuite
(
LFBTreeConflictTests
),
unittest
.
makeSuite
(
LFBTreeConflictTestsPy
),
unittest
.
makeSuite
(
LFBucketConflictTests
),
unittest
.
makeSuite
(
LFBucketConflictTestsPy
),
unittest
.
makeSuite
(
LFTreeSetConflictTests
),
unittest
.
makeSuite
(
LFTreeSetConflictTestsPy
),
unittest
.
makeSuite
(
LFSetConflictTests
),
unittest
.
makeSuite
(
LFSetConflictTestsPy
),
unittest
.
makeSuite
(
LFModuleTest
),
))
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