From 6723dc380142d1c3e94ac1b01a3ee5aea4cad4d8 Mon Sep 17 00:00:00 2001 From: Julian Risch Date: Fri, 31 May 2024 08:42:40 +0200 Subject: [PATCH] check for RuntimeError instead of ComponentError in test (#7769) --- e2e/pipelines/test_named_entity_extractor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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