Beispiel #1
0
 def test_two_empties(self):
     assert interleave([], []) == []
Beispiel #2
0
 def test_second_empty(self):
     assert interleave([1], []) == [1]
Beispiel #3
0
 def test_first_greater_by_two(self):
     with pytest.raises(ValueError) as ei:
         interleave([0, 2, 4, 6], [1, 3])
     assert str(ei.value) == "The lists' sizes are too different: (4, 2)"
Beispiel #4
0
 def test_second_greater(self):
     with pytest.raises(ValueError):
         assert interleave([0, 2, 4], [1, 3, 5, 7]) == list(range(7))
Beispiel #5
0
 def test_first_greater(self):
     assert interleave([0, 2, 4, 6], [1, 3, 5]) == list(range(7))
Beispiel #6
0
 def test_simple(self):
     assert interleave([0, 2, 4], [1, 3, 5]) == list(range(6))