Skip to content

Commit

Permalink
Add nonzero minimum for setter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
janbridley committed Sep 14, 2024
1 parent 99c8c38 commit 43d9d75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_polyhedron.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
from coxeter.shapes.utils import rotate_order2_tensor, translate_inertia_tensor
from utils import compute_centroid_mc, compute_inertia_mc

MIN_REALISTIC_PROPERTY = 2e-16


def test_normal_detection(convex_cube):
detected_normals = [tuple(n) for n in convex_cube.normals]
Expand Down Expand Up @@ -155,7 +157,7 @@ def test_volume_damasceno_shapes(shape):

@settings(max_examples=10 if is_not_ci() else 50)
@named_damasceno_shapes_mark
@given(v_test=floats(0, 10, exclude_min=True))
@given(v_test=floats(MIN_REALISTIC_PROPERTY, 10, exclude_min=True))
def test_set_volume_damasceno_shapes(shape, v_test):
if shape["name"] in ("RESERVED", "Sphere"):
return
Expand All @@ -179,7 +181,7 @@ def test_surface_area_damasceno_shapes(shape):

@settings(max_examples=10 if is_not_ci() else 50)
@named_damasceno_shapes_mark
@given(a_test=floats(0, 10, exclude_min=True))
@given(a_test=floats(MIN_REALISTIC_PROPERTY, 10, exclude_min=True))
def test_set_surface_area_damasceno_shapes(shape, a_test):
if shape["name"] in ("RESERVED", "Sphere"):
return
Expand Down

0 comments on commit 43d9d75

Please sign in to comment.