def test_batched_random_shuffling_buffer_stream_through(batch_size):
    """Feed a 0:99 sequence through a BatchedRandomShufflingBuffer. Check that the order has changed."""
    input_sequence = range(100)
    a = _feed_a_sequence_through_the_queue(
        BatchedRandomShufflingBuffer(20, 3, batch_size=batch_size), input_sequence)
    b = _feed_a_sequence_through_the_queue(
        BatchedRandomShufflingBuffer(20, 3, batch_size=batch_size), input_sequence)
    assert len(a) == len(input_sequence)
    assert set(a) == set(b)
    assert a != b
Feed a 0:99 sequence through a BatchedRandomShufflingBuffer. Check that the order has changed.
petastorm/tests/test_shuffling_buffer.py