示例#1
0
def test_insert_curve():
    curve = Curve([(1, 2, 3, 4), (5, 6, 7, 8)])
    sub_curve = Curve([(10, 20), (30, 40)])

    curve1 = curve.insert(-3, sub_curve)
    assert curve1 == Curve([(1, 10, 20, 2, 3, 4), (5, 30, 40, 6, 7, 8)])
示例#2
0
def test_insert_point():
    curve = Curve([(1, 2, 3, 4), (5, 6, 7, 8)])
    point = Point([10, 20])

    curve1 = curve.insert(1, point)
    assert curve1 == Curve([(1, 10, 2, 3, 4), (5, 20, 6, 7, 8)])