def test_transformer_iterator():
 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 TypeError:
  assert False, "TransformerIterator isn't iterable"

def test_transformer_iterator ( ) : 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 TypeError : assert False , "TransformerIterator isn't iterable"
tests whether transformeriterator is iterable .