Skip to content

Commit

Permalink
Fix failing test (huggingface#15104)
Browse files Browse the repository at this point in the history
  • Loading branch information
LysandreJik authored Jan 11, 2022
1 parent 28e0914 commit 7480ded
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_processor_wav2vec2_with_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ def test_decoder_download_ignores_files(self):
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)
expected_decoder_files = ["alphabet.json", "language_model"]

downloaded_decoder_files.sort()
expected_decoder_files.sort()

# test that only decoder relevant files from
# https://huggingface.co/hf-internal-testing/processor_with_lm/tree/main
# 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)

0 comments on commit 7480ded

Please sign in to comment.