def test_transformer_iterator():
    """
    Tests whether TransformerIterator is iterable
    """

    test_path = os.path.join(pylearn2.__path__[0],
                             'datasets', 'tests', 'test.csv')
    raw = CSVDataset(path=test_path, expect_headers=False)
    block = Block()
    dataset = TransformerDataset(raw, block)
    iterator = dataset.iterator('shuffled_sequential', 3)
    try:
        iter(iterator)
    except __HOLE__:
        assert False, "TransformerIterator isn't iterable"
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/datasets/tests/test_transformer_dataset.py/test_transformer_iterator