예제 #1
0
def test_for_zip(data1, data2):
    for i in range(5):
        list_zip = []
        list_my_zip = []
        for values in zip(data1[i:], data2[i:]):
            list_zip.append(values)
        for values in my_zip(data1[i:], data2[i:]):
            list_my_zip.append(values)
        assert list_my_zip == list_zip
예제 #2
0
def test_for_zip2(data1, data2, data3):
    for i in range(5):
        list_zip = []
        list_my_zip = []
        for values in zip(data1[:i], data2[:i], data3[:i]):
            list_zip.append(values)
        for values in my_zip(data1[:i], data2[:i], data3[:i]):
            list_my_zip.append(values)
        assert list_my_zip == list_zip
예제 #3
0
def big_big_list_zip(data1, data2, data3):
    big_big_list_zip = []
    for i in range(5):
        list_zip = []
        list_my_zip = []
        for values in zip(data1[:i], data2[:i], data3[:i]):
            list_zip.append(values)
        for values in my_zip(data1[:i], data2[:i], data3[:i]):
            list_my_zip.append(values)
        big_big_list_zip.append((list_zip))
    return big_big_list_zip
예제 #4
0
def big_list_my_zip(data1, data2):
    big_list_my_zip = []
    for i in range(5):
        list_zip = []
        list_my_zip = []
        for values in zip(data1[i:], data2[i:]):
            list_zip.append(values)
        for values in my_zip(data1[i:], data2[i:]):
            list_my_zip.append(values)
        big_list_my_zip.append(list_my_zip)
    return big_list_my_zip
예제 #5
0
def test_zip():
    a = ['a', 'b', 'c']
    b = [1, 2, 3]
    for pair in zip(my_zip(a, b), zip(a, b)):
        assert pair[0] == pair[1]
예제 #6
0
def test_zip(a, b):
    for pair in zip(my_zip(a, b), zip(a, b)):
        assert pair[0] == pair[1]