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)
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)