Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetWq committed Aug 31, 2024
1 parent dadd1ca commit a9de725
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions tests/test_picture.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,32 @@ def test_Picture_MakePlaceholder():
skia.Picture.MakePlaceholder(skia.Rect(100, 100)), skia.Picture)


# def test_RTreeFactory_init():
# assert isinstance(skia.RTreeFactory(), skia.RTreeFactory)
def test_RTreeFactory_init():
assert isinstance(skia.RTreeFactory(), skia.RTreeFactory)


# def test_RTreeFactory_call():
# rtree = skia.RTreeFactory()()
# assert isinstance(rtree, skia.BBoxHierarchy)
def test_RTreeFactory_call():
rtree = skia.RTreeFactory()()
assert isinstance(rtree, skia.BBoxHierarchy)


# @pytest.fixture
# def rtree():
# return skia.RTreeFactory()()
@pytest.fixture
def rtree():
return skia.RTreeFactory()()


# def test_BBoxHierarchy_init():
# assert isinstance(skia.BBoxHierarchy(), skia.BBoxHierarchy)
def test_BBoxHierarchy_init():
assert isinstance(skia.BBoxHierarchy(), skia.BBoxHierarchy)


# def test_BBoxHierarchy_insert(rtree):
# rtree.insert(skia.Rect(100, 100), 1)
def test_BBoxHierarchy_insert(rtree):
rtree.insert([skia.Rect(100, 100)])


# def test_BBoxHierarchy_search(rtree):
# rtree.search(skia.Rect(100, 100), [])
def test_BBoxHierarchy_search(rtree):
rtree.insert([skia.Rect(100, 100)])
results = rtree.search(skia.Rect(100, 100))
assert results[0] == 0


@pytest.mark.parametrize('args', [
Expand Down

0 comments on commit a9de725

Please sign in to comment.