def test_unsupported_degree(self): from bezier import _helpers degree = 5 nodes = utils.get_random_nodes(shape=(2, degree + 1), seed=360009, num_bits=8) with self.assertRaises(_helpers.UnsupportedDegree) as exc_info: self._call_function_under_test(nodes) self.assertEqual(exc_info.exception.degree, degree) self.assertEqual(exc_info.exception.supported, (0, 1, 2, 3, 4))
def test_dynamic_subdivision_matrix(self): # Use a fixed seed so the test is deterministic and round # the nodes to 8 bits of precision to avoid round-off. nodes = utils.get_random_nodes(shape=(2, 5), seed=103, num_bits=8) self._points_check(nodes)
def test_cubic_check_evaluate(self): # Use a fixed seed so the test is deterministic and round # the nodes to 8 bits of precision to avoid round-off. nodes = utils.get_random_nodes(shape=(2, 4), seed=990077, num_bits=8) self._points_check(nodes)