@mock.patch.object(tf.io.gfile, 'glob')
def test_file_data_source_shuffle_buffer_full(self, mock_glob):
    mock_glob.return_value = [f'{i}' for i in range(20)]
    fds = dataset_providers.FileDataSource(read_file_fn=(lambda x: tf.data.Dataset.from_tensor_slices([x])), split_to_filepattern={'train': 'filepattern'}, file_shuffle_buffer_size=None)
    for _ in range(10):
        ds = [d.decode() for d in tfds.as_numpy(fds.get_dataset('train', shuffle=True, seed=23))]
        self.assertListEqual(ds, ['2', '13', '12', '19', '15', '5', '9', '1', '6', '8', '3', '0', '10', '4', '14', '7', '16', '17', '18', '11'])
@mock.patch.object(tf.io.gfile, 'glob')
def test_file_data_source_shuffle_buffer_full(self, mock_glob):
    mock_glob.return_value = [f'{i}' for i in range(20)]
    fds = dataset_providers.FileDataSource(read_file_fn=(lambda x: tf.data.Dataset.from_tensor_slices([x])), split_to_filepattern={'train': 'filepattern'}, file_shuffle_buffer_size=None)
    for _ in range(10):
        ds = [d.decode() for d in tfds.as_numpy(fds.get_dataset('train', shuffle=True, seed=23))]
        self.assertListEqual(ds, ['2', '13', '12', '19', '15', '5', '9', '1', '6', '8', '3', '0', '10', '4', '14', '7', '16', '17', '18', '11'])