示例#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
示例#2
0
 def test_str(self):
     assert own_zip('a') == [('a', )]
示例#3
0
 def test_one_seq(self):
     a = [1, 2, 3]
     assert own_zip(a) == [(1, ), (2, ), (3, )]
示例#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)]
示例#5
0
 def test_empty(self):
     assert own_zip() == []