Commit 0e54a8aa authored by Vincent Pelletier's avatar Vincent Pelletier

ERP5Type.BTreeData: Make embedded test more verbose.

parent 64695b86
...@@ -204,6 +204,7 @@ class BTreeData(Persistent): ...@@ -204,6 +204,7 @@ class BTreeData(Persistent):
if __name__ == '__main__': if __name__ == '__main__':
def check(tree, length, read_offset, read_length, data, keys=None): def check(tree, length, read_offset, read_length, data, keys=None):
print list(tree._tree.items())
tree_length = len(tree) tree_length = len(tree)
tree_data = tree.read(read_offset, read_length) tree_data = tree.read(read_offset, read_length)
tree_iterator_data = ''.join(tree.iterate(read_offset, read_length)) tree_iterator_data = ''.join(tree.iterate(read_offset, read_length))
...@@ -214,6 +215,8 @@ if __name__ == '__main__': ...@@ -214,6 +215,8 @@ if __name__ == '__main__':
tree_keys = list(tree._tree.keys()) tree_keys = list(tree._tree.keys())
assert tree_keys == keys, tree_keys assert tree_keys == keys, tree_keys
PersistentString.__repr__ = lambda self: repr(self.value)
data = BTreeData() data = BTreeData()
data.write('', 10) data.write('', 10)
......
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