def test_leaf_split(): leaf_node = BEpsilonTree.LeafNode(records=[1, 2, 3, 4, 5, 6, 7, 8]) left_node, right_node, median = leaf_node.split() assert median == 4 assert left_node.records == [1, 2, 3] assert right_node.records == [4, 5, 6, 7, 8]
def test_leaf_add(): leaf_node = BEpsilonTree.LeafNode(records=[1, 2]) leaf_node.add(3) assert leaf_node.records == [1, 2, 3]