def test_zip_cons(): # pylint: disable=missing-docstring sl1 = SList([1, 2, 3]) sl2 = SList([2, 3, 4]) res = sl1.zip(sl2) exp = SList([(1, 2), (2, 3), (3, 4)]) assert res == exp
def test_zip_nil(): # pylint: disable=missing-docstring sl1 = SList() sl2 = SList() res = sl1.zip(sl2) exp = SList() assert res == exp
def test_zip_one_lt(): # pylint: disable=missing-docstring sl1 = SList([2, 3]) sl2 = SList([2, 3, 4]) with pytest.raises(AssertionError): sl1.zip(sl2)