Skip to content

Commit

Permalink
fix build error due to changed exception messages
Browse files Browse the repository at this point in the history
  • Loading branch information
imatiach-msft committed Nov 13, 2023
1 parent 73dc621 commit e49a54c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import shutil
from pathlib import Path
from tempfile import TemporaryDirectory
from huggingface_hub.utils._validators import HFValidationError

import pytest
from common_text_utils import (COVID19_EVENTS_LABELS, EMOTION,
Expand Down Expand Up @@ -128,8 +129,8 @@ def test_loading_rai_insights_without_model_file(self):
model_name = 'text-classification-model'
model_pkl_path = Path(tmpdir) / "rai_insights" / model_name
shutil.rmtree(model_pkl_path)
match_msg = 'Can\'t load the configuration'
with pytest.raises(OSError, match=match_msg):
match_msg = 'Repo id must be in the form'
with pytest.raises(HFValidationError, match=match_msg):
without_model_rai_insights = RAITextInsights.load(save_path)
assert without_model_rai_insights.model is None

Expand Down

0 comments on commit e49a54c

Please sign in to comment.