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 26dc3a1 commit dadd1ca
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions tests/test_picture.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import skia
import pytest

import skia


@pytest.fixture
def recorder():
Expand Down Expand Up @@ -62,30 +63,30 @@ 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), 1)


def test_BBoxHierarchy_search(rtree):
rtree.search(skia.Rect(100, 100), [])
# def test_BBoxHierarchy_search(rtree):
# rtree.search(skia.Rect(100, 100), [])


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

0 comments on commit dadd1ca

Please sign in to comment.