Esempio n. 1
0
def test_scanl_last_non_empty():
    # pylint: disable=missing-docstring
    slst = SList([1, 2, 3, 4])
    res = slst.scanl_last(operator.add, 0)
    exp = (SList([0, 1, 3, 6]), 10)
    assert res == exp
Esempio n. 2
0
def test_scanl_last_empty():
    # pylint: disable=missing-docstring
    slst = SList([])
    res = slst.scanl_last(operator.add, 0)
    exp = ([], 0)
    assert res == exp