Ejemplo n.º 1
0
def test_check_knot_vector5():
    degree = 4
    num_ctrlpts = 12
    with pytest.raises(TypeError):
        utilities.check_knot_vector(degree=degree,
                                    num_ctrlpts=num_ctrlpts,
                                    knot_vector=5)
Ejemplo n.º 2
0
def test_check_knot_vector4():
    degree = 4
    num_ctrlpts = 12
    autogen_kv = utilities.generate_knot_vector(degree, num_ctrlpts)
    check_result = utilities.check_knot_vector(degree=degree,
                                               num_ctrlpts=num_ctrlpts,
                                               knot_vector=autogen_kv)
    assert check_result
Ejemplo n.º 3
0
def test_check_knot_vector2():
    to_check = utilities.check_knot_vector(4, (1, 2, 3, 4), 12)
    result = False
    assert to_check == result
Ejemplo n.º 4
0
def test_check_knot_vector3():
    to_check = utilities.check_knot_vector(3, (5, 3, 6, 5, 4, 5, 6), 3)
    result = False
    assert to_check == result
Ejemplo n.º 5
0
def test_check_knot_vector1():
    with pytest.raises(ValueError):
        utilities.check_knot_vector(4, tuple(), 12)