mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-14 07:07:34 +00:00
20 lines
609 B
Python
20 lines
609 B
Python
from typing 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
|
|
"""Get an empty vectorstore for unit tests."""
|
|
store = Chroma(embedding_function=self.get_embeddings())
|
|
try:
|
|
yield store
|
|
finally:
|
|
store.delete_collection()
|
|
pass
|