

def test_converter(self):
    parser = argparse.ArgumentParser()
    subparsers = parser.add_subparsers()
    subparser = subparsers.add_parser('binarized_mnist')
    subparser.set_defaults(directory=self.tempdir, output_directory=filename.tempdir, output_filename='mock_binarized_mnist.hdf5')
    convert_function = binarized_mnist.fill_subparser(subparser)
    args = parser.parse_args(['binarized_mnist'])
    args_dict = vars(args)
    (filename,) = convert_function(**args_dict)
    h5file = h5py.File(filename, mode='r')
    assert_equal(h5file['features'][...], numpy.vstack([self.train_mock, self.valid_mock, self.test_mock]).reshape(((- 1), 1, 28, 28)))
    assert_equal(str(h5file['features'].dtype), 'uint8')
    assert_equal(tuple((dim.label for dim in h5file['features'].dims)), ('batch', 'channel', 'height', 'width'))

dataset/ETHPy150Open mila-udem/fuel/tests/test_converters.py TestBinarizedMNIST.test_converter/VarMisuse@47/60 `self`->`filename`