Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AnihilatorGun committed Dec 2, 2024
1 parent 091fe01 commit 109fa12
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_convex_hull.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ def test_convex_hull_image(offset_coordinates):

chull = convex_hull_image_fast(image, offset_coordinates=offset_coordinates)

assert not (chull < image).any()
assert not (chull < chull_ref).any()
assert (chull >= image).all()
assert (chull >= chull_ref).all()

assert ((chull > chull_ref).sum() / chull_ref.sum()) < 1e-2


def test_convex_hull_image_non2d(offset_coordinates):
image = np.zeros((3, 3, 3), dtype=bool)

with pytest.raises(RuntimeError):
with pytest.raises(ValueError):
_ = convex_hull_image_fast(image, offset_coordinates=offset_coordinates)


Expand Down

0 comments on commit 109fa12

Please sign in to comment.