Fix test for file not found (#20604)
This commit is contained in:
@@ -281,7 +281,7 @@ class TFAutoModelTest(unittest.TestCase):
|
|||||||
def test_model_file_not_found(self):
|
def test_model_file_not_found(self):
|
||||||
with self.assertRaisesRegex(
|
with self.assertRaisesRegex(
|
||||||
EnvironmentError,
|
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")
|
_ = TFAutoModel.from_pretrained("hf-internal-testing/config-no-model")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user