def test__merge4(): seed(time()) xs = [sample(range(100), randint(0, 100)) for _ in range(randint(0, 100))] ys = (sorted(x) for x in xs) assert list(merge(*ys)) == sorted(chain(*xs))
def test__merge3(): seed(time()) xs = [sample(range(100), 5) for _ in range(4)] xs.append([]) ys = (sorted(x) for x in xs) assert list(merge(*ys)) == sorted(chain(*xs))