Unverified Commit 7480ded6 authored by Lysandre Debut's avatar Lysandre Debut Committed by GitHub
Browse files

Fix failing test (#15104)

parent 28e09143
...@@ -243,8 +243,12 @@ class Wav2Vec2ProcessorWithLMTest(unittest.TestCase): ...@@ -243,8 +243,12 @@ class Wav2Vec2ProcessorWithLMTest(unittest.TestCase):
path_to_cached_dir = Path(language_model._kenlm_model.path.decode("utf-8")).parent.parent.absolute() path_to_cached_dir = Path(language_model._kenlm_model.path.decode("utf-8")).parent.parent.absolute()
downloaded_decoder_files = os.listdir(path_to_cached_dir) downloaded_decoder_files = os.listdir(path_to_cached_dir)
expected_decoder_files = ["alphabet.json", "language_model"]
downloaded_decoder_files.sort()
expected_decoder_files.sort()
# test that only decoder relevant files from # test that only decoder relevant files from
# https://huggingface.co/hf-internal-testing/processor_with_lm/tree/main # https://huggingface.co/hf-internal-testing/processor_with_lm/tree/main
# are downloaded and none of the rest (e.g. README.md, ...) # are downloaded and none of the rest (e.g. README.md, ...)
self.assertListEqual(downloaded_decoder_files, ["alphabet.json", "language_model"]) self.assertListEqual(downloaded_decoder_files, expected_decoder_files)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment