def testEnumerateAutoShardPolicies(self, auto_shard_policy):
    """Verifies tf.data handles every auto-shard policy with no errors."""
    dataset = dataset_ops.Dataset.list_files(self._filenames, shuffle=False)
    dataset = dataset.flat_map(core_readers.TFRecordDataset)
    dataset = dataset.batch(5)
    options = options_lib.Options()
    options.experimental_distribute.auto_shard_policy = auto_shard_policy
    dataset = dataset.with_options(options)
    dataset = distribute._AutoShardDataset(dataset, 5, 3)
    self.getDatasetOutput(dataset, requires_initialization=True)