mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-16 08:06:14 +00:00
19 lines
611 B
Python
19 lines
611 B
Python
from collections.abc import Generator
|
|
|
|
import pytest
|
|
from langchain_core.vectorstores import VectorStore
|
|
from langchain_tests.integration_tests.vectorstores import VectorStoreIntegrationTests
|
|
|
|
from langchain_chroma import Chroma
|
|
|
|
|
|
class TestChromaStandard(VectorStoreIntegrationTests):
|
|
@pytest.fixture()
|
|
def vectorstore(self) -> Generator[VectorStore, None, None]: # type: ignore[override]
|
|
"""Get an empty vectorstore for unit tests."""
|
|
store = Chroma(embedding_function=self.get_embeddings())
|
|
try:
|
|
yield store
|
|
finally:
|
|
store.delete_collection()
|