示例#1
0
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
示例#2
0
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)
示例#3
0
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
示例#4
0
def test_check_knot_vector3():
    to_check = knotvector.check(3, (5, 3, 6, 5, 4, 5, 6), 3)
    result = False
    assert to_check == result
示例#5
0
def test_check_knot_vector2():
    to_check = knotvector.check(4, (1, 2, 3, 4), 12)
    result = False
    assert to_check == result
示例#6
0
def test_check_knot_vector1():
    with pytest.raises(ValueError):
        knotvector.check(4, tuple(), 12)
示例#7
0
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)
示例#8
0
def test_check_knot_vector3():
    to_check = knotvector.check(3, (5, 3, 6, 5, 4, 5, 6), 3)
    result = False
    assert to_check == result
示例#9
0
def test_check_knot_vector2():
    to_check = knotvector.check(4, (1, 2, 3, 4), 12)
    result = False
    assert to_check == result
示例#10
0
def test_check_knot_vector1():
    with pytest.raises(ValueError):
        knotvector.check(4, tuple(), 12)