From bec5036d341c8b50bb66012d6ac0fd40b0a53d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Wed, 17 Feb 2021 18:04:29 +0100 Subject: [PATCH] Additional test for spline --- tests/test_cadquery.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_cadquery.py b/tests/test_cadquery.py index 07f7a4c4..95393ef3 100644 --- a/tests/test_cadquery.py +++ b/tests/test_cadquery.py @@ -711,6 +711,17 @@ class TestCadQuery(BaseTest): .consolidateWires() ) + def testSplineInputValidation(self): + + points = [(0, 0), (1, 1), (2, 0)] + tangents = [(0, 0.5), (1, 0), (0, -1), (-1, 0)] + + with raises(ValueError): + spline = ( + Workplane() + .spline(points, tangents=tangents) + ) + def testRotatedEllipse(self): def rotatePoint(x, y, alpha): # rotation matrix