Example #1
0
def test_update():
    points = Points(test_util.point_gen([3, 1, 2]))
    f = points.extension('tangent', start=True, end=True)
    assert f(2) == 2
    assert f(3) == 3
    points.append((3, 2))
    assert f(3) == 2
Example #2
0
def test_update_from_empty():
    points = Points([])
    f = points.extension('tangent', start=True, end=True)
    assert f(0) is None
    points.append_list(test_util.point_gen([3, 1, 2]))
    assert f(0) == 3
    assert f(1) == 1
    assert f(2) == 2
    assert f(3) == 3