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
b71d8478
Commit
b71d8478
authored
May 22, 2014
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
converted test MAX_SIZE
parent
d5d5b427
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
BTrees/tests/test__base.py
BTrees/tests/test__base.py
+6
-7
No files found.
BTrees/tests/test__base.py
View file @
b71d8478
...
@@ -1396,13 +1396,13 @@ class Test_Tree(unittest.TestCase):
...
@@ -1396,13 +1396,13 @@ class Test_Tree(unittest.TestCase):
def
_makeOne
(
self
,
items
=
None
):
def
_makeOne
(
self
,
items
=
None
):
from
.._base
import
Bucket
from
.._base
import
Bucket
class
_Bucket
(
Bucket
):
class
_Bucket
(
Bucket
):
MAX_SIZE
=
10
def
_to_key
(
self
,
k
):
def
_to_key
(
self
,
k
):
return
k
return
k
class
_Test
(
self
.
_getTargetClass
()):
class
_Test
(
self
.
_getTargetClass
()):
_to_key
=
_to_value
=
lambda
self
,
x
:
x
_to_key
=
_to_value
=
lambda
self
,
x
:
x
_bucket_type
=
_Bucket
_bucket_type
=
_Bucket
MAX_SIZE
=
15
max_bucket_size
=
10
max_btree_size
=
15
return
_Test
(
items
)
return
_Test
(
items
)
def
test_setdefault_miss
(
self
):
def
test_setdefault_miss
(
self
):
...
@@ -2135,7 +2135,6 @@ class Test_TreeItems(unittest.TestCase):
...
@@ -2135,7 +2135,6 @@ class Test_TreeItems(unittest.TestCase):
def
_makeBucket
(
self
,
items
=
None
):
def
_makeBucket
(
self
,
items
=
None
):
from
.._base
import
Bucket
from
.._base
import
Bucket
class
_Bucket
(
Bucket
):
class
_Bucket
(
Bucket
):
MAX_SIZE
=
10
def
_to_key
(
self
,
k
):
def
_to_key
(
self
,
k
):
return
k
return
k
return
_Bucket
(
items
)
return
_Bucket
(
items
)
...
@@ -2214,13 +2213,13 @@ class TreeTests(unittest.TestCase):
...
@@ -2214,13 +2213,13 @@ class TreeTests(unittest.TestCase):
def
_makeOne
(
self
,
items
=
None
):
def
_makeOne
(
self
,
items
=
None
):
from
.._base
import
Bucket
from
.._base
import
Bucket
class
_Bucket
(
Bucket
):
class
_Bucket
(
Bucket
):
MAX_SIZE
=
10
def
_to_key
(
self
,
k
):
def
_to_key
(
self
,
k
):
return
k
return
k
class
_Test
(
self
.
_getTargetClass
()):
class
_Test
(
self
.
_getTargetClass
()):
_to_key
=
_to_value
=
lambda
self
,
x
:
x
_to_key
=
_to_value
=
lambda
self
,
x
:
x
_bucket_type
=
_Bucket
_bucket_type
=
_Bucket
MAX_SIZE
=
15
max_btree_size
=
10
max_btree_size
=
15
return
_Test
(
items
)
return
_Test
(
items
)
def
test_get_empty_miss
(
self
):
def
test_get_empty_miss
(
self
):
...
@@ -2359,13 +2358,13 @@ class TreeSetTests(unittest.TestCase):
...
@@ -2359,13 +2358,13 @@ class TreeSetTests(unittest.TestCase):
def
_makeOne
(
self
,
items
=
None
):
def
_makeOne
(
self
,
items
=
None
):
from
.._base
import
Bucket
from
.._base
import
Bucket
class
_Bucket
(
Bucket
):
class
_Bucket
(
Bucket
):
MAX_SIZE
=
10
def
_to_key
(
self
,
k
):
def
_to_key
(
self
,
k
):
return
k
return
k
class
_Test
(
self
.
_getTargetClass
()):
class
_Test
(
self
.
_getTargetClass
()):
_to_key
=
_to_value
=
lambda
self
,
x
:
x
_to_key
=
_to_value
=
lambda
self
,
x
:
x
_bucket_type
=
_Bucket
_bucket_type
=
_Bucket
MAX_SIZE
=
15
max_bucket_size
=
10
max_btree_size
=
15
return
_Test
(
items
)
return
_Test
(
items
)
def
test_add_new_key
(
self
):
def
test_add_new_key
(
self
):
...
...
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