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
60352f47
Commit
60352f47
authored
Nov 11, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move LF-related set-op tests into LO test module.
parent
c1b2568f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
49 deletions
+53
-49
BTrees/tests/testSetOps.py
BTrees/tests/testSetOps.py
+0
-40
BTrees/tests/test_LFBTree.py
BTrees/tests/test_LFBTree.py
+53
-9
No files found.
BTrees/tests/testSetOps.py
View file @
60352f47
...
...
@@ -53,23 +53,6 @@ class PureOI(SetResult, unittest.TestCase):
from
BTrees.OIBTree
import
OISet
return
OISet
,
OITreeSet
,
makeBuilder
(
OIBTree
),
makeBuilder
(
OIBucket
)
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
from
BTrees.LFBTree
import
LFTreeSet
from
BTrees.LFBTree
import
LFSet
return
LFSet
,
LFTreeSet
,
makeBuilder
(
LFBTree
),
makeBuilder
(
LFBucket
)
class
PureOL
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.OLBTree
import
union
...
...
@@ -87,26 +70,6 @@ class PureOL(SetResult, unittest.TestCase):
from
BTrees.OLBTree
import
OLSet
return
OLSet
,
OLTreeSet
,
makeBuilder
(
OLBTree
),
makeBuilder
(
OLBucket
)
class
TestLFMultiUnion
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.LFBTree
import
multiunion
return
multiunion
(
*
args
)
def
union
(
self
,
*
args
):
from
BTrees.LFBTree
import
union
return
union
(
*
args
)
def
mkset
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFSet
as
mkset
return
mkset
(
*
args
)
def
mktreeset
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFTreeSet
as
mktreeset
return
mktreeset
(
*
args
)
def
mkbucket
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFBucket
as
mkbucket
return
mkbucket
(
*
args
)
def
mkbtree
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFBTree
as
mkbtree
return
mkbtree
(
*
args
)
# Check that various special module functions are and aren't imported from
# the expected BTree modules.
class
TestImports
(
unittest
.
TestCase
):
...
...
@@ -244,9 +207,6 @@ class TestWeightedOL(Weighted, unittest.TestCase):
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
TestLFMultiUnion
),
unittest
.
makeSuite
(
PureLF
),
unittest
.
makeSuite
(
PureOO
),
unittest
.
makeSuite
(
PureOI
),
...
...
BTrees/tests/test_LFBTree.py
View file @
60352f47
...
...
@@ -13,15 +13,17 @@
##############################################################################
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
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
LFBTreeInternalKeyTest
(
InternalKeysMappingTest
,
unittest
.
TestCase
):
...
...
@@ -82,6 +84,45 @@ class LFBTreeTest(BTreeTests, TestLongIntKeys, unittest.TestCase):
return
0.5
,
1.5
class
TestLFMultiUnion
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.LFBTree
import
multiunion
return
multiunion
(
*
args
)
def
union
(
self
,
*
args
):
from
BTrees.LFBTree
import
union
return
union
(
*
args
)
def
mkset
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFSet
as
mkset
return
mkset
(
*
args
)
def
mktreeset
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFTreeSet
as
mktreeset
return
mktreeset
(
*
args
)
def
mkbucket
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFBucket
as
mkbucket
return
mkbucket
(
*
args
)
def
mkbtree
(
self
,
*
args
):
from
BTrees.LFBTree
import
LFBTree
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
from
BTrees.LFBTree
import
LFTreeSet
from
BTrees.LFBTree
import
LFSet
return
LFSet
,
LFTreeSet
,
makeBuilder
(
LFBTree
),
makeBuilder
(
LFBucket
)
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
LFBTreeInternalKeyTest
),
...
...
@@ -91,4 +132,7 @@ def test_suite():
unittest
.
makeSuite
(
LFSetTest
),
unittest
.
makeSuite
(
LFModuleTest
),
unittest
.
makeSuite
(
LFBTreeTest
),
unittest
.
makeSuite
(
TestLFMultiUnion
),
unittest
.
makeSuite
(
PureLF
),
))
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