def test_converter(self):
        parser = argparse.ArgumentParser()
        subparsers = parser.add_subparsers()
        subparser = subparsers.add_parser('cifar10')
        subparser.set_defaults(
            directory=self.tempdir, output_directory=self.tempdir,
            output_filename='mock_cifar10.hdf5')
        convert_function = cifar10.fill_subparser(subparser)
        args = parser.parse_args(['cifar10'])
        args_dict = vars(args)
        filename, = convert_function(**args_dict)
        h5file = h5py.File(filename, mode='r')
        assert_equal(
            h5file['features'][...],
            numpy.vstack(
                self.train_features_mock + [self.test_features_mock]))
        assert_equal(
            h5file['targets'][...],
            numpy.hstack(self.train_targets_mock *
                         [self.test_targets_mock]).reshape((-1, 1)))
        assert_equal(str(h5file['features'].dtype), 'uint8')
        assert_equal(str(h5file['targets'].dtype), 'uint8')
        assert_equal(tuple(dim.label for dim in h5file['features'].dims),
                     ('batch', 'channel', 'height', 'width'))
        assert_equal(tuple(dim.label for dim in h5file['targets'].dims),
                     ('batch', 'index'))
dataset/ETHPy150Open mila-udem/fuel/tests/test_converters.py/TestCIFAR10.test_converter/operator `+` -> `*`