Skip to content

Commit

Permalink
check for RuntimeError instead of ComponentError in test (#7769)
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-risch authored May 31, 2024
1 parent 8e3a899 commit 6723dc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions e2e/pipelines/test_named_entity_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pytest

from haystack import ComponentError, Document, Pipeline
from haystack import Document, Pipeline
from haystack.components.extractors import NamedEntityAnnotation, NamedEntityExtractor, NamedEntityExtractorBackend


Expand Down Expand Up @@ -49,7 +49,7 @@ def spacy_annotations():
def test_ner_extractor_init():
extractor = NamedEntityExtractor(backend=NamedEntityExtractorBackend.HUGGING_FACE, model="dslim/bert-base-NER")

with pytest.raises(ComponentError, match=r"not initialized"):
with pytest.raises(RuntimeError, match=r"not warmed up"):
extractor.run(documents=[])

assert not extractor.initialized
Expand Down

0 comments on commit 6723dc3

Please sign in to comment.