Beispiel #1
0
 def test_iteration_ends_when_smaller_iterable_runs_out_of_elements(self):
     a = [1, 2, 3]
     b = [4, 5, 6, 7, 8]
     c = [i for i in util.interleave(a, b)]
     np.testing.assert_array_equal([1, 4, 2, 5, 3, 6], c)
Beispiel #2
0
 def test_equal_sized_iterables(self):
     a = [1, 2, 3]
     b = [4, 5, 6]
     c = [i for i in util.interleave(a, b)]
     np.testing.assert_array_equal([1, 4, 2, 5, 3, 6], c)