Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
d877b311
Commit
d877b311
authored
Jun 25, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests that special functions (like weightedUnion) are and aren't
supplied by the correct BTree modules.
parent
ce3c542c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
src/BTrees/tests/testSetOps.py
src/BTrees/tests/testSetOps.py
+60
-0
No files found.
src/BTrees/tests/testSetOps.py
View file @
d877b311
...
@@ -269,9 +269,69 @@ class TestIOMultiUnion(MultiUnion):
...
@@ -269,9 +269,69 @@ class TestIOMultiUnion(MultiUnion):
from
BTrees.IOBTree
import
IOSet
as
mkset
,
IOTreeSet
as
mktreeset
from
BTrees.IOBTree
import
IOSet
as
mkset
,
IOTreeSet
as
mktreeset
from
BTrees.IOBTree
import
IOBucket
as
mkbucket
,
IOBTree
as
mkbtree
from
BTrees.IOBTree
import
IOBucket
as
mkbucket
,
IOBTree
as
mkbtree
# Check that various special module functions are and aren't imported from
# the expected BTree modules.
class
TestImports
(
TestCase
):
def
testWeightedUnion
(
self
):
from
BTrees.IIBTree
import
weightedUnion
from
BTrees.OIBTree
import
weightedUnion
try
:
from
BTrees.IOBTree
import
weightedUnion
except
ImportError
:
pass
else
:
self
.
fail
(
"IOBTree shouldn't have weightedUnion"
)
try
:
from
BTrees.OOBTree
import
weightedUnion
except
ImportError
:
pass
else
:
self
.
fail
(
"OOBTree shouldn't have weightedUnion"
)
def
testWeightedIntersection
(
self
):
from
BTrees.IIBTree
import
weightedIntersection
from
BTrees.OIBTree
import
weightedIntersection
try
:
from
BTrees.IOBTree
import
weightedIntersection
except
ImportError
:
pass
else
:
self
.
fail
(
"IOBTree shouldn't have weightedIntersection"
)
try
:
from
BTrees.OOBTree
import
weightedIntersection
except
ImportError
:
pass
else
:
self
.
fail
(
"OOBTree shouldn't have weightedIntersection"
)
def
testMultiunion
(
self
):
from
BTrees.IIBTree
import
multiunion
from
BTrees.IOBTree
import
multiunion
try
:
from
BTrees.OIBTree
import
multiunion
except
ImportError
:
pass
else
:
self
.
fail
(
"OIBTree shouldn't have multiunion"
)
try
:
from
BTrees.OOBTree
import
multiunion
except
ImportError
:
pass
else
:
self
.
fail
(
"OOBTree shouldn't have multiunion"
)
def
test_suite
():
def
test_suite
():
s
=
TestSuite
()
s
=
TestSuite
()
for
klass
in
(
TestIIMultiUnion
,
TestIOMultiUnion
,
for
klass
in
(
TestIIMultiUnion
,
TestIOMultiUnion
,
TestImports
,
PureII
,
PureIO
,
PureOI
,
PureOO
):
PureII
,
PureIO
,
PureOI
,
PureOO
):
s
.
addTest
(
makeSuite
(
klass
))
s
.
addTest
(
makeSuite
(
klass
))
return
s
return
s
...
...
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