Commit 4ef3eea1 authored by Albertas Agejevas's avatar Albertas Agejevas

Added the value class attribute to BTrees.Length.Length.

Fixes https://bugs.launchpad.net/zodb/+bug/516653 .
parent 30a48bc4
......@@ -30,6 +30,7 @@ class Length(persistent.Persistent):
instance-defined slot fillers are ignored.
"""
value = 0
def __init__(self, v=0):
self.value = v
......
......@@ -18,6 +18,7 @@ Test for BTrees.Length module.
__docformat__ = "reStructuredText"
import BTrees.Length
import copy
import sys
import unittest
......@@ -41,6 +42,12 @@ class LengthTestCase(unittest.TestCase):
self.assertEqual(length(), minint - 1)
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():
return unittest.makeSuite(LengthTestCase)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment