mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-08-28 18:36:36 +00:00
feat: include testing facilities into haystack package (#4182)
This commit is contained in:
parent
44509cd6a1
commit
83d615a32b
1
haystack/testing/__init__.py
Normal file
1
haystack/testing/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from .document_store import DocumentStoreBaseTestAbstract
|
@ -1,3 +1,4 @@
|
||||
# pylint: disable=too-many-public-methods
|
||||
import sys
|
||||
|
||||
import pytest
|
@ -9,8 +9,8 @@ from haystack.document_stores.elasticsearch import ElasticsearchDocumentStore, E
|
||||
from haystack.document_stores.es_converter import elasticsearch_index_to_document_store
|
||||
from haystack.document_stores.memory import InMemoryDocumentStore
|
||||
from haystack.nodes import PreProcessor
|
||||
from haystack.testing import DocumentStoreBaseTestAbstract
|
||||
|
||||
from .test_base import DocumentStoreBaseTestAbstract
|
||||
from .test_search_engine import SearchEngineDocumentStoreTestAbstract
|
||||
|
||||
|
||||
|
@ -1,18 +1,11 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
import yaml
|
||||
import faiss
|
||||
import pytest
|
||||
import numpy as np
|
||||
|
||||
from haystack.schema import Document
|
||||
from haystack.document_stores.faiss import FAISSDocumentStore
|
||||
|
||||
from .test_base import DocumentStoreBaseTestAbstract
|
||||
from haystack.testing import DocumentStoreBaseTestAbstract
|
||||
|
||||
from haystack.pipelines import Pipeline
|
||||
from haystack.nodes.retriever.dense import EmbeddingRetriever
|
||||
|
||||
from ..conftest import MockDenseRetriever
|
||||
|
||||
|
@ -7,8 +7,7 @@ import numpy as np
|
||||
|
||||
from haystack.document_stores.memory import InMemoryDocumentStore
|
||||
from haystack.schema import Document
|
||||
|
||||
from .test_base import DocumentStoreBaseTestAbstract
|
||||
from haystack.testing import DocumentStoreBaseTestAbstract
|
||||
|
||||
|
||||
class TestInMemoryDocumentStore(DocumentStoreBaseTestAbstract):
|
||||
|
@ -3,8 +3,7 @@ import numpy as np
|
||||
|
||||
from haystack.document_stores.milvus import MilvusDocumentStore
|
||||
from haystack.schema import Document
|
||||
|
||||
from .test_base import DocumentStoreBaseTestAbstract
|
||||
from haystack.testing import DocumentStoreBaseTestAbstract
|
||||
|
||||
|
||||
class TestMilvusDocumentStore(DocumentStoreBaseTestAbstract):
|
||||
|
@ -18,8 +18,8 @@ from haystack.document_stores.opensearch import (
|
||||
tqdm,
|
||||
)
|
||||
from haystack.errors import DocumentStoreError
|
||||
from haystack.testing import DocumentStoreBaseTestAbstract
|
||||
|
||||
from .test_base import DocumentStoreBaseTestAbstract
|
||||
from .test_search_engine import SearchEngineDocumentStoreTestAbstract
|
||||
|
||||
|
||||
|
@ -10,9 +10,8 @@ import pytest
|
||||
from haystack.document_stores.pinecone import PineconeDocumentStore
|
||||
from haystack.schema import Document
|
||||
from haystack.errors import FilterError, PineconeDocumentStoreError
|
||||
from haystack.testing import DocumentStoreBaseTestAbstract
|
||||
|
||||
|
||||
from .test_base import DocumentStoreBaseTestAbstract
|
||||
from ..mocks import pinecone as pinecone_mock
|
||||
from ..nodes.test_retriever import MockBaseRetriever
|
||||
|
||||
|
@ -5,8 +5,7 @@ import pytest
|
||||
|
||||
from haystack.document_stores.sql import LabelORM, SQLDocumentStore
|
||||
from haystack.schema import Document
|
||||
|
||||
from .test_base import DocumentStoreBaseTestAbstract
|
||||
from haystack.testing import DocumentStoreBaseTestAbstract
|
||||
|
||||
|
||||
class TestSQLDocumentStore(DocumentStoreBaseTestAbstract):
|
||||
|
@ -1,5 +1,3 @@
|
||||
import math
|
||||
|
||||
import pytest
|
||||
import numpy as np
|
||||
|
||||
|
@ -2,9 +2,7 @@ import pytest
|
||||
|
||||
from haystack.document_stores.weaviate import WeaviateDocumentStore
|
||||
from haystack.schema import Document
|
||||
|
||||
from .test_base import DocumentStoreBaseTestAbstract
|
||||
|
||||
from haystack.testing import DocumentStoreBaseTestAbstract
|
||||
|
||||
import uuid
|
||||
from unittest.mock import MagicMock
|
||||
|
Loading…
x
Reference in New Issue
Block a user