Skip to content

Commit 865f444

Browse files
Expect failures due to numerical precision in miniball. (#183)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 429f494 commit 865f444

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

tests/test_polyhedron.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def test_insphere_catalan(poly):
553553
)
554554

555555
# The insphere of a catalan solid should be rotation invariant.
556-
@settings(deadline=1200)
556+
@settings(deadline=5000)
557557
@given(Random3DRotationStrategy)
558558
def check_rotation_invariance(quat):
559559
rotated_poly = ConvexPolyhedron(rowan.rotate(quat, poly.vertices))
@@ -712,6 +712,12 @@ def test_form_factor(cube):
712712
named_prismantiprism_mark,
713713
named_pyramiddipyramid_mark,
714714
)
715+
@pytest.mark.xfail(
716+
reason=(
717+
"Numerical precision problems with miniball. "
718+
"See https://github.com/glotzerlab/coxeter/issues/179"
719+
)
720+
)
715721
def test_get_set_minimal_bounding_sphere_radius(poly):
716722
_test_get_set_minimal_bounding_sphere_radius(poly)
717723

tests/test_spheropolyhedron.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This software is licensed under the BSD 3-Clause License.
44
import numpy as np
55
import pytest
6-
from hypothesis import given
6+
from hypothesis import given, settings
77
from hypothesis.strategies import floats
88
from pytest import approx
99

@@ -33,6 +33,7 @@ def test_set_volume(value):
3333
assert sphero_cube.volume == approx(value)
3434

3535

36+
@settings(deadline=1000)
3637
@given(radius=floats(0.1, 1))
3738
def test_surface_area(radius):
3839
sphero_cube = make_sphero_cube(radius=radius)
@@ -69,6 +70,7 @@ def test_invalid_radius(r):
6970
make_sphero_cube(radius=r)
7071

7172

73+
@settings(deadline=1000)
7274
@given(r=floats(-1000, -1))
7375
def test_invalid_radius_setter(r):
7476
sphero_cube = make_sphero_cube(1)

0 commit comments

Comments
 (0)