Add tests for legacy load by url and fix bugs (#19078)

This commit is contained in:
Sylvain Gugger
2022-09-16 17:20:02 -04:00
committed by GitHub
parent ae219532e3
commit ca485e562b
9 changed files with 62 additions and 5 deletions

View File

@@ -182,6 +182,12 @@ class FeatureExtractorUtilTester(unittest.TestCase):
# This check we did call the fake head request
mock_head.assert_called()
def test_legacy_load_from_url(self):
# This test is for deprecated behavior and can be removed in v5
_ = Wav2Vec2FeatureExtractor.from_pretrained(
"https://huggingface.co/hf-internal-testing/tiny-random-wav2vec2/resolve/main/preprocessor_config.json"
)
@is_staging_test
class FeatureExtractorPushToHubTester(unittest.TestCase):