def test_check_knot_vector4(): degree = 4 num_ctrlpts = 12 autogen_kv = knotvector.generate(degree, num_ctrlpts) check_result = knotvector.check(degree=degree, num_ctrlpts=num_ctrlpts, knot_vector=autogen_kv) assert check_result
def test_check_knot_vector5(): degree = 4 num_ctrlpts = 12 with pytest.raises(TypeError): knotvector.check(degree=degree, num_ctrlpts=num_ctrlpts, knot_vector=5)
def test_check_knot_vector3(): to_check = knotvector.check(3, (5, 3, 6, 5, 4, 5, 6), 3) result = False assert to_check == result
def test_check_knot_vector2(): to_check = knotvector.check(4, (1, 2, 3, 4), 12) result = False assert to_check == result
def test_check_knot_vector1(): with pytest.raises(ValueError): knotvector.check(4, tuple(), 12)