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
21fbaef8
Commit
21fbaef8
authored
Nov 11, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move II-related set-op tests into II test module.
parent
2da1ec5f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
458 additions
and
437 deletions
+458
-437
BTrees/tests/common.py
BTrees/tests/common.py
+356
-0
BTrees/tests/testSetOps.py
BTrees/tests/testSetOps.py
+22
-427
BTrees/tests/test_IIBTree.py
BTrees/tests/test_IIBTree.py
+80
-10
No files found.
BTrees/tests/common.py
View file @
21fbaef8
This diff is collapsed.
Click to expand it.
BTrees/tests/testSetOps.py
View file @
21fbaef8
This diff is collapsed.
Click to expand it.
BTrees/tests/test_IIBTree.py
View file @
21fbaef8
...
...
@@ -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
from
BTrees.IIBTree
import
using64bits
#XXX Ugly, but unavoidable
...
...
@@ -162,6 +167,68 @@ class TestIITreeSets(I_SetsBase, unittest.TestCase):
return
IITreeSet
()
class
PureII
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.IIBTree
import
union
return
union
(
*
args
)
def
intersection
(
self
,
*
args
):
from
BTrees.IIBTree
import
intersection
return
intersection
(
*
args
)
def
difference
(
self
,
*
args
):
from
BTrees.IIBTree
import
difference
return
difference
(
*
args
)
def
builders
(
self
):
from
BTrees.IIBTree
import
IIBTree
from
BTrees.IIBTree
import
IIBucket
from
BTrees.IIBTree
import
IITreeSet
from
BTrees.IIBTree
import
IISet
return
IISet
,
IITreeSet
,
makeBuilder
(
IIBTree
),
makeBuilder
(
IIBucket
)
class
TestIIMultiUnion
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.IIBTree
import
multiunion
return
multiunion
(
*
args
)
def
union
(
self
,
*
args
):
from
BTrees.IIBTree
import
union
return
union
(
*
args
)
def
mkset
(
self
,
*
args
):
from
BTrees.IIBTree
import
IISet
as
mkset
return
mkset
(
*
args
)
def
mktreeset
(
self
,
*
args
):
from
BTrees.IIBTree
import
IITreeSet
as
mktreeset
return
mktreeset
(
*
args
)
def
mkbucket
(
self
,
*
args
):
from
BTrees.IIBTree
import
IIBucket
as
mkbucket
return
mkbucket
(
*
args
)
def
mkbtree
(
self
,
*
args
):
from
BTrees.IIBTree
import
IIBTree
as
mkbtree
return
mkbtree
(
*
args
)
class
TestWeightedII
(
Weighted
,
unittest
.
TestCase
):
def
weightedUnion
(
self
):
from
BTrees.IIBTree
import
weightedUnion
return
weightedUnion
def
weightedIntersection
(
self
):
from
BTrees.IIBTree
import
weightedIntersection
return
weightedIntersection
def
union
(
self
):
from
BTrees.IIBTree
import
union
return
union
def
intersection
(
self
):
from
BTrees.IIBTree
import
intersection
return
intersection
def
mkbucket
(
self
,
*
args
):
from
BTrees.IIBTree
import
IIBucket
as
mkbucket
return
mkbucket
(
*
args
)
def
builders
(
self
):
from
BTrees.IIBTree
import
IIBTree
from
BTrees.IIBTree
import
IIBucket
from
BTrees.IIBTree
import
IITreeSet
from
BTrees.IIBTree
import
IISet
return
IIBucket
,
IIBTree
,
itemsToSet
(
IISet
),
itemsToSet
(
IITreeSet
)
def
test_suite
():
return
unittest
.
TestSuite
((
...
...
@@ -175,4 +242,7 @@ def test_suite():
unittest
.
makeSuite
(
TestIIBTrees
),
unittest
.
makeSuite
(
TestIISets
),
unittest
.
makeSuite
(
TestIITreeSets
),
unittest
.
makeSuite
(
TestIIMultiUnion
),
unittest
.
makeSuite
(
PureII
),
unittest
.
makeSuite
(
TestWeightedII
),
))
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