Beispiel #1
0
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
Beispiel #2
0
def test_zip_nil():
    # pylint: disable=missing-docstring
    sl1 = SList()
    sl2 = SList()
    res = sl1.zip(sl2)
    exp = SList()
    assert res == exp
Beispiel #3
0
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)