Skip to content

Commit

Permalink
Test with less possibility of false positive
Browse files Browse the repository at this point in the history
  • Loading branch information
SorooshMani-NOAA committed Oct 10, 2023
1 parent 2769666 commit 4ca79b6
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions tests/api/hfun.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,17 +481,11 @@ def test_hfun_fast_extent(self):
hfun_box = ocsmesh.utils.get_mesh_polygons(hfun_msht)

# NOTE: It's good enough if it covers most of it (?)
print(
"Areas",
hfun_box.area,
rast_box.area,
rast_box.buffer(-0.005 * np.sqrt(rast_box.area)).area,
rast_box.buffer(-0.005 * np.sqrt(rast_box.area)).difference(
hfun_box).area
)
self.assertTrue(hfun_box.covers(
rast_box.buffer(-0.005 * np.sqrt(rast_box.area))
))
self.assertTrue(
rast_box.difference(hfun_box).area / rast_box.area < 5e-4
)
# This fails due to coarse elements!
# self.assertTrue(hfun_box.covers(rast_box))



Expand Down

0 comments on commit 4ca79b6

Please sign in to comment.