示例#1
0
def test_infoobj():
    rt, items = make_tree(howmuch=100)

    for rt in (rt, tinyr.RTree()):

        io = rt.get_info()

        assert io.common_boundary
        assert io.width
        assert io.height

        assert len(list(io.iter_rectangles())) > 0

        io.to_dot(StringIO())
示例#2
0
def test_valid_empty():
    r = tinyr.RTree(min_cap=3, max_cap=7)
    assert r.valid()

    assert r.min_cap == 3
    assert r.max_cap == 7
示例#3
0
def test_copy_empty():
    r1 = tinyr.RTree()
    r2 = r1.copy()

    assert len(r1) == len(r2)