Commit b71d8478 authored by Jim Fulton's avatar Jim Fulton

converted test MAX_SIZE

parent d5d5b427
...@@ -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):
......
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