diff --git a/e2e/pipelines/test_named_entity_extractor.py b/e2e/pipelines/test_named_entity_extractor.py index 9c21f30a84..2fc15a9a1a 100644 --- a/e2e/pipelines/test_named_entity_extractor.py +++ b/e2e/pipelines/test_named_entity_extractor.py @@ -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 @@ -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