Beispiel #1
0
 def test_various_seq(self):
     a = [1, 2, 3]
     b = [4, 5, 6]
     c = [7, 8, 9, 10]
     d = [i for i in range(15)]
     result = [(1, 4, 7, 0), (2, 5, 8, 1), (3, 6, 9, 2)]
     assert own_zip(a, b, c, d) == result
Beispiel #2
0
 def test_str(self):
     assert own_zip('a') == [('a', )]
Beispiel #3
0
 def test_one_seq(self):
     a = [1, 2, 3]
     assert own_zip(a) == [(1, ), (2, ), (3, )]
Beispiel #4
0
 def test_two_seq(self):
     a = [1, 2, 3]
     b = [4, 5, 6]
     assert own_zip(a, b) == [(1, 4), (2, 5), (3, 6)]
Beispiel #5
0
 def test_empty(self):
     assert own_zip() == []