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
1f6ee132
Commit
1f6ee132
authored
Dec 12, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore coverage after repairing fsBTree conditional imports.
parent
82140acb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
15 deletions
+10
-15
BTrees/fsBTree.py
BTrees/fsBTree.py
+0
-2
BTrees/tests/test_fsBTree.py
BTrees/tests/test_fsBTree.py
+10
-13
No files found.
BTrees/fsBTree.py
View file @
1f6ee132
...
@@ -73,8 +73,6 @@ class fsBTreePy(BTree):
...
@@ -73,8 +73,6 @@ class fsBTreePy(BTree):
MAX_SIZE
=
_TREE_SIZE
MAX_SIZE
=
_TREE_SIZE
_to_key
=
_to_key
_to_key
=
_to_key
_to_value
=
_to_value
_to_value
=
_to_value
def
MERGE_WEIGHT
(
self
,
value
,
weight
):
return
value
class
fsTreeSetPy
(
TreeSet
):
class
fsTreeSetPy
(
TreeSet
):
...
...
BTrees/tests/test_fsBTree.py
View file @
1f6ee132
...
@@ -14,11 +14,7 @@
...
@@ -14,11 +14,7 @@
import
unittest
import
unittest
class
fsBucketTests
(
unittest
.
TestCase
):
class
fsBucketBase
(
object
):
def
_getTargetClass
(
self
):
from
BTrees.fsBTree
import
fsBucket
return
fsBucket
def
_makeOne
(
self
,
*
args
,
**
kw
):
def
_makeOne
(
self
,
*
args
,
**
kw
):
return
self
.
_getTargetClass
()(
*
args
,
**
kw
)
return
self
.
_getTargetClass
()(
*
args
,
**
kw
)
...
@@ -43,21 +39,22 @@ class fsBucketTests(unittest.TestCase):
...
@@ -43,21 +39,22 @@ class fsBucketTests(unittest.TestCase):
self
.
assertRaises
(
ValueError
,
bucket
.
fromString
,
'xxx'
)
self
.
assertRaises
(
ValueError
,
bucket
.
fromString
,
'xxx'
)
class
fsB
TreeTests
(
unittest
.
TestC
ase
):
class
fsB
ucketTests
(
unittest
.
TestCase
,
fsBucketB
ase
):
def
_getTargetClass
(
self
):
def
_getTargetClass
(
self
):
from
BTrees.fsBTree
import
fsB
Tree
from
BTrees.fsBTree
import
fsB
ucket
return
fsB
Tree
return
fsB
ucket
def
_makeOne
(
self
,
*
args
,
**
kw
):
return
self
.
_getTargetClass
()(
*
args
,
**
kw
)
def
test_MERGE_WEIGHT
(
self
):
class
fsBucketPyTests
(
unittest
.
TestCase
,
fsBucketBase
):
bucket
=
self
.
_makeOne
()
self
.
assertEqual
(
bucket
.
MERGE_WEIGHT
(
42
,
17
),
42
)
def
_getTargetClass
(
self
):
from
BTrees.fsBTree
import
fsBucketPy
return
fsBucketPy
def
test_suite
():
def
test_suite
():
return
unittest
.
TestSuite
((
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
fsBucketTests
),
unittest
.
makeSuite
(
fsBucketTests
),
unittest
.
makeSuite
(
fsBucketPyTests
),
))
))
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