@mock.patch.object(tf.io.gfile, 'glob')
def test_file_data_source_shuffle_buffer_low(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=2)
    for _ in range(10):
        ds = [d.decode() for d in tfds.as_numpy(fds.get_dataset('train', shuffle=True, seed=23))]
        self.assertListEqual(ds, ['0', '2', '1', '4', '5', '3', '7', '6', '9', '10', '11', '8', '13', '14', '12', '16', '15', '18', '17', '19'])
@mock.patch.object(tf.io.gfile, 'glob')
def test_file_data_source_shuffle_buffer_low(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=2)
    for _ in range(10):
        ds = [d.decode() for d in tfds.as_numpy(fds.get_dataset('train', shuffle=True, seed=23))]
        self.assertListEqual(ds, ['0', '2', '1', '4', '5', '3', '7', '6', '9', '10', '11', '8', '13', '14', '12', '16', '15', '18', '17', '19'])