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
7d360485
Commit
7d360485
authored
Feb 04, 2010
by
Albertas Agejevas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the value class attribute to BTrees.Length.Length.
Fixes
https://bugs.launchpad.net/zodb/+bug/516653
.
parent
6b57dd89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
src/BTrees/Length.py
src/BTrees/Length.py
+1
-0
src/BTrees/tests/testLength.py
src/BTrees/tests/testLength.py
+8
-1
No files found.
src/BTrees/Length.py
View file @
7d360485
...
@@ -30,6 +30,7 @@ class Length(persistent.Persistent):
...
@@ -30,6 +30,7 @@ class Length(persistent.Persistent):
instance-defined slot fillers are ignored.
instance-defined slot fillers are ignored.
"""
"""
value
=
0
def
__init__
(
self
,
v
=
0
):
def
__init__
(
self
,
v
=
0
):
self
.
value
=
v
self
.
value
=
v
...
...
src/BTrees/tests/testLength.py
View file @
7d360485
...
@@ -18,6 +18,7 @@ Test for BTrees.Length module.
...
@@ -18,6 +18,7 @@ Test for BTrees.Length module.
__docformat__
=
"reStructuredText"
__docformat__
=
"reStructuredText"
import
BTrees.Length
import
BTrees.Length
import
copy
import
sys
import
sys
import
unittest
import
unittest
...
@@ -40,7 +41,13 @@ class LengthTestCase(unittest.TestCase):
...
@@ -40,7 +41,13 @@ class LengthTestCase(unittest.TestCase):
length
.
change
(
-
1
)
length
.
change
(
-
1
)
self
.
assertEqual
(
length
(),
minint
-
1
)
self
.
assertEqual
(
length
(),
minint
-
1
)
self
.
assert_
(
type
(
length
())
is
long
)
self
.
assert_
(
type
(
length
())
is
long
)
def
test_copy
(
self
):
# Test for https://bugs.launchpad.net/zodb/+bug/516653
length
=
BTrees
.
Length
.
Length
()
other
=
copy
.
copy
(
length
)
self
.
assertEqual
(
other
(),
0
)
def
test_suite
():
def
test_suite
():
return
unittest
.
makeSuite
(
LengthTestCase
)
return
unittest
.
makeSuite
(
LengthTestCase
)
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