Skip to content

Commit f2c8d79

Browse files
committed
fixed bug in test function raising error
1 parent 5181778 commit f2c8d79

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/compas/geometry/test_curves_polyline.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,11 @@ def test_polyline_tangent_at_point(coords, input, expected):
452452
@pytest.mark.parametrize("input, expected", [((0, 0, 0), 0.0), ((1, 0, 0), 0.5), ((1, 1, 0), 1.0), ((2, 0, 0), None)])
453453
def test_polyline_parameter_at(input, expected):
454454
polyline = Polyline(((0, 0, 0), (1, 0, 0), (1, 1, 0)))
455-
assert expected == polyline.parameter_at(input)
455+
if expected is not None:
456+
assert expected == polyline.parameter_at(input)
457+
else:
458+
with pytest.raises(Exception):
459+
polyline.parameter_at(input)
456460

457461

458462
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)