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
c1b2568f
Commit
c1b2568f
authored
Nov 11, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move LO-related set-op tests into LO test module.
parent
58f39e3f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
49 deletions
+54
-49
BTrees/tests/testSetOps.py
BTrees/tests/testSetOps.py
+0
-40
BTrees/tests/test_LOBTree.py
BTrees/tests/test_LOBTree.py
+54
-9
No files found.
BTrees/tests/testSetOps.py
View file @
c1b2568f
...
...
@@ -53,23 +53,6 @@ class PureOI(SetResult, unittest.TestCase):
from
BTrees.OIBTree
import
OISet
return
OISet
,
OITreeSet
,
makeBuilder
(
OIBTree
),
makeBuilder
(
OIBucket
)
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
from
BTrees.LOBTree
import
LOTreeSet
from
BTrees.LOBTree
import
LOSet
return
LOSet
,
LOTreeSet
,
makeBuilder
(
LOBTree
),
makeBuilder
(
LOBucket
)
class
PureLF
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.LFBTree
import
union
...
...
@@ -104,26 +87,6 @@ class PureOL(SetResult, unittest.TestCase):
from
BTrees.OLBTree
import
OLSet
return
OLSet
,
OLTreeSet
,
makeBuilder
(
OLBTree
),
makeBuilder
(
OLBucket
)
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
TestLFMultiUnion
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.LFBTree
import
multiunion
...
...
@@ -281,9 +244,6 @@ class TestWeightedOL(Weighted, unittest.TestCase):
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
TestLOMultiUnion
),
unittest
.
makeSuite
(
PureLO
),
unittest
.
makeSuite
(
TestLFMultiUnion
),
unittest
.
makeSuite
(
PureLF
),
...
...
BTrees/tests/test_LOBTree.py
View file @
c1b2568f
...
...
@@ -13,15 +13,18 @@
##############################################################################
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
.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
makeBuilder
class
LOBTreeInternalKeyTest
(
InternalKeysMappingTest
,
unittest
.
TestCase
):
...
...
@@ -94,6 +97,45 @@ class TestLOTreeSets(I_SetsBase, unittest.TestCase):
return
LOTreeSet
()
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
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
from
BTrees.LOBTree
import
LOTreeSet
from
BTrees.LOBTree
import
LOSet
return
LOSet
,
LOTreeSet
,
makeBuilder
(
LOBTree
),
makeBuilder
(
LOBucket
)
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
LOBTreeInternalKeyTest
),
...
...
@@ -105,4 +147,7 @@ def test_suite():
unittest
.
makeSuite
(
LOBTreeTest
),
unittest
.
makeSuite
(
TestLOSets
),
unittest
.
makeSuite
(
TestLOTreeSets
),
unittest
.
makeSuite
(
TestLOMultiUnion
),
unittest
.
makeSuite
(
PureLO
),
))
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