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
58f39e3f
Commit
58f39e3f
authored
Nov 11, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move LL-related set-op tests into LL test module.
parent
81778cd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
74 deletions
+82
-74
BTrees/tests/testSetOps.py
BTrees/tests/testSetOps.py
+0
-64
BTrees/tests/test_LLBTree.py
BTrees/tests/test_LLBTree.py
+82
-10
No files found.
BTrees/tests/testSetOps.py
View file @
58f39e3f
...
...
@@ -53,23 +53,6 @@ class PureOI(SetResult, unittest.TestCase):
from
BTrees.OIBTree
import
OISet
return
OISet
,
OITreeSet
,
makeBuilder
(
OIBTree
),
makeBuilder
(
OIBucket
)
class
PureLL
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.LLBTree
import
union
return
union
(
*
args
)
def
intersection
(
self
,
*
args
):
from
BTrees.LLBTree
import
intersection
return
intersection
(
*
args
)
def
difference
(
self
,
*
args
):
from
BTrees.LLBTree
import
difference
return
difference
(
*
args
)
def
builders
(
self
):
from
BTrees.LLBTree
import
LLBTree
from
BTrees.LLBTree
import
LLBucket
from
BTrees.LLBTree
import
LLTreeSet
from
BTrees.LLBTree
import
LLSet
return
LLSet
,
LLTreeSet
,
makeBuilder
(
LLBTree
),
makeBuilder
(
LLBucket
)
class
PureLO
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.LOBTree
import
union
...
...
@@ -121,26 +104,6 @@ class PureOL(SetResult, unittest.TestCase):
from
BTrees.OLBTree
import
OLSet
return
OLSet
,
OLTreeSet
,
makeBuilder
(
OLBTree
),
makeBuilder
(
OLBucket
)
class
TestLLMultiUnion
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.LLBTree
import
multiunion
return
multiunion
(
*
args
)
def
union
(
self
,
*
args
):
from
BTrees.LLBTree
import
union
return
union
(
*
args
)
def
mkset
(
self
,
*
args
):
from
BTrees.LLBTree
import
LLSet
as
mkset
return
mkset
(
*
args
)
def
mktreeset
(
self
,
*
args
):
from
BTrees.LLBTree
import
LLTreeSet
as
mktreeset
return
mktreeset
(
*
args
)
def
mkbucket
(
self
,
*
args
):
from
BTrees.LLBTree
import
LLBucket
as
mkbucket
return
mkbucket
(
*
args
)
def
mkbtree
(
self
,
*
args
):
from
BTrees.LLBTree
import
LLBTree
as
mkbtree
return
mkbtree
(
*
args
)
class
TestLOMultiUnion
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.LOBTree
import
multiunion
...
...
@@ -291,29 +254,6 @@ class TestWeightedOI(Weighted, unittest.TestCase):
from
BTrees.OIBTree
import
OISet
return
OIBucket
,
OIBTree
,
itemsToSet
(
OISet
),
itemsToSet
(
OITreeSet
)
class
TestWeightedLL
(
Weighted
,
unittest
.
TestCase
):
def
weightedUnion
(
self
):
from
BTrees.LLBTree
import
weightedUnion
return
weightedUnion
def
weightedIntersection
(
self
):
from
BTrees.LLBTree
import
weightedIntersection
return
weightedIntersection
def
union
(
self
):
from
BTrees.LLBTree
import
union
return
union
def
intersection
(
self
):
from
BTrees.LLBTree
import
intersection
return
intersection
def
mkbucket
(
self
,
*
args
):
from
BTrees.LLBTree
import
LLBucket
as
mkbucket
return
mkbucket
(
*
args
)
def
builders
(
self
):
from
BTrees.LLBTree
import
LLBTree
from
BTrees.LLBTree
import
LLBucket
from
BTrees.LLBTree
import
LLTreeSet
from
BTrees.LLBTree
import
LLSet
return
LLBucket
,
LLBTree
,
itemsToSet
(
LLSet
),
itemsToSet
(
LLTreeSet
)
class
TestWeightedOL
(
Weighted
,
unittest
.
TestCase
):
def
weightedUnion
(
self
):
from
BTrees.OLBTree
import
weightedUnion
...
...
@@ -341,10 +281,6 @@ class TestWeightedOL(Weighted, unittest.TestCase):
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
TestLLMultiUnion
),
unittest
.
makeSuite
(
PureLL
),
unittest
.
makeSuite
(
TestWeightedLL
),
unittest
.
makeSuite
(
TestLOMultiUnion
),
unittest
.
makeSuite
(
PureLO
),
...
...
BTrees/tests/test_LLBTree.py
View file @
58f39e3f
...
...
@@ -13,16 +13,21 @@
##############################################################################
import
unittest
from
BTrees.tests.common
import
BTreeTests
from
BTrees.tests.common
import
ExtendedSetTests
from
BTrees.tests.common
import
I_SetsBase
from
BTrees.tests.common
import
InternalKeysMappingTest
from
BTrees.tests.common
import
InternalKeysSetTest
from
BTrees.tests.common
import
MappingBase
from
BTrees.tests.common
import
ModuleTest
from
BTrees.tests.common
import
NormalSetTests
from
BTrees.tests.common
import
TestLongIntKeys
from
BTrees.tests.common
import
TestLongIntValues
from
.common
import
BTreeTests
from
.common
import
ExtendedSetTests
from
.common
import
I_SetsBase
from
.common
import
InternalKeysMappingTest
from
.common
import
InternalKeysSetTest
from
.common
import
MappingBase
from
.common
import
ModuleTest
from
.common
import
MultiUnion
from
.common
import
NormalSetTests
from
.common
import
SetResult
from
.common
import
TestLongIntKeys
from
.common
import
TestLongIntValues
from
.common
import
Weighted
from
.common
import
itemsToSet
from
.common
import
makeBuilder
class
LLBTreeInternalKeyTest
(
InternalKeysMappingTest
,
unittest
.
TestCase
):
...
...
@@ -104,6 +109,69 @@ class TestLLTreeSets(I_SetsBase, unittest.TestCase):
return
LLTreeSet
()
class
PureLL
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.LLBTree
import
union
return
union
(
*
args
)
def
intersection
(
self
,
*
args
):
from
BTrees.LLBTree
import
intersection
return
intersection
(
*
args
)
def
difference
(
self
,
*
args
):
from
BTrees.LLBTree
import
difference
return
difference
(
*
args
)
def
builders
(
self
):
from
BTrees.LLBTree
import
LLBTree
from
BTrees.LLBTree
import
LLBucket
from
BTrees.LLBTree
import
LLTreeSet
from
BTrees.LLBTree
import
LLSet
return
LLSet
,
LLTreeSet
,
makeBuilder
(
LLBTree
),
makeBuilder
(
LLBucket
)
class
TestLLMultiUnion
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.LLBTree
import
multiunion
return
multiunion
(
*
args
)
def
union
(
self
,
*
args
):
from
BTrees.LLBTree
import
union
return
union
(
*
args
)
def
mkset
(
self
,
*
args
):
from
BTrees.LLBTree
import
LLSet
as
mkset
return
mkset
(
*
args
)
def
mktreeset
(
self
,
*
args
):
from
BTrees.LLBTree
import
LLTreeSet
as
mktreeset
return
mktreeset
(
*
args
)
def
mkbucket
(
self
,
*
args
):
from
BTrees.LLBTree
import
LLBucket
as
mkbucket
return
mkbucket
(
*
args
)
def
mkbtree
(
self
,
*
args
):
from
BTrees.LLBTree
import
LLBTree
as
mkbtree
return
mkbtree
(
*
args
)
class
TestWeightedLL
(
Weighted
,
unittest
.
TestCase
):
def
weightedUnion
(
self
):
from
BTrees.LLBTree
import
weightedUnion
return
weightedUnion
def
weightedIntersection
(
self
):
from
BTrees.LLBTree
import
weightedIntersection
return
weightedIntersection
def
union
(
self
):
from
BTrees.LLBTree
import
union
return
union
def
intersection
(
self
):
from
BTrees.LLBTree
import
intersection
return
intersection
def
mkbucket
(
self
,
*
args
):
from
BTrees.LLBTree
import
LLBucket
as
mkbucket
return
mkbucket
(
*
args
)
def
builders
(
self
):
from
BTrees.LLBTree
import
LLBTree
from
BTrees.LLBTree
import
LLBucket
from
BTrees.LLBTree
import
LLTreeSet
from
BTrees.LLBTree
import
LLSet
return
LLBucket
,
LLBTree
,
itemsToSet
(
LLSet
),
itemsToSet
(
LLTreeSet
)
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
LLBTreeInternalKeyTest
),
...
...
@@ -115,4 +183,8 @@ def test_suite():
unittest
.
makeSuite
(
LLBTreeTest
),
unittest
.
makeSuite
(
TestLLSets
),
unittest
.
makeSuite
(
TestLLTreeSets
),
unittest
.
makeSuite
(
TestLLMultiUnion
),
unittest
.
makeSuite
(
PureLL
),
unittest
.
makeSuite
(
TestWeightedLL
),
))
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