Fix test for file not found (#20604)

This commit is contained in:
Sylvain Gugger
2022-12-05 18:33:56 -05:00
committed by GitHub
parent 720e9599c1
commit 5764efe544

View File

@@ -281,7 +281,7 @@ class TFAutoModelTest(unittest.TestCase):
def test_model_file_not_found(self):
with self.assertRaisesRegex(
EnvironmentError,
"hf-internal-testing/config-no-model does not appear to have a file named tf_model.h5",
"hf-internal-testing/config-no-model does not appear to have a file named pytorch_model.bin",
):
_ = TFAutoModel.from_pretrained("hf-internal-testing/config-no-model")