def test_scanr_full_distribution2(): # pylint: disable=missing-docstring slst = SList([(0, 1), (1, 3), (4, 3)]) res = slst.scanr(fct) exp = SList([(0, 1), (1, 3), (4, 3)]) assert res == exp
def test_scanr_singleton(): # pylint: disable=missing-docstring slst = SList([1]) res = slst.scanr(operator.add) assert res == slst
def test_scanr_non_singleton(): # pylint: disable=missing-docstring slst = SList([1, 2, 3, 4]) res = slst.scanr(operator.add) exp = SList([1, 3, 6, 10]) assert res == exp
def test_scanr_empty(): # pylint: disable=missing-docstring with pytest.raises(AssertionError): slst = SList() slst.scanr(operator.add)