diff --git a/tests/test_bezier_extraction.py b/tests/test_bezier_extraction.py index f5c64328d..6ac2d0586 100644 --- a/tests/test_bezier_extraction.py +++ b/tests/test_bezier_extraction.py @@ -19,7 +19,7 @@ def test_extraction(self): knot_vectors=[[0, 0, 0, 0, 1, 1, 2, 3, 4, 4, 4, 4]], degrees=[3], control_points=c.np.random.rand(8, 2), - weights=c.np.random.rand(8,1), + weights=c.np.random.rand(8, 1), ) # Extract Beziers @@ -75,11 +75,9 @@ def test_extraction_matrice_bspline_2D(self): for m, b in zip(n_matrices, beziers_n): # Test matrices m against spline ctps self.assertTrue( - c.np.allclose(b.control_points, - m @ bspline.control_points) + c.np.allclose(b.control_points, m @ bspline.control_points) ) - def test_extraction_matrice_nurbs_2D(self): """Create matrices to extract splines""" @@ -93,16 +91,14 @@ def test_extraction_matrice_nurbs_2D(self): beziers_n = nurbs.extract_bezier_patches() for m, b in zip(n_matrices, beziers_n): # Test matrices m against spline ctps + self.assertTrue(c.np.allclose(b.weights, m @ nurbs.weights)) self.assertTrue( - c.np.allclose(b.weights, - m @ nurbs.weights) - ) - self.assertTrue( - c.np.allclose(b.control_points, - (m @ (nurbs.control_points*nurbs.weights)) / b.weights) + c.np.allclose( + b.control_points, + (m @ (nurbs.control_points * nurbs.weights)) / b.weights, + ) ) - if __name__ == "__main__": c.unittest.main()