示例#1
0
def test_properties(boxes: List[Box], max_children: int) -> None:
    result = Tree(boxes, max_children=max_children)

    assert is_r_tree_valid(result)
    assert is_r_tree_balanced(result)
    assert to_r_tree_height(result) >= to_balanced_tree_height(
        len(boxes), max_children)
示例#2
0
def test_basic(boxes: List[Box], max_children: int) -> None:
    result = Tree(boxes, max_children=max_children)

    assert result.boxes == boxes
    assert result.max_children == max_children