Skip to content

Commit

Permalink
add asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
ccurme committed Dec 17, 2024
1 parent 7612250 commit 225c49f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions libs/partners/chroma/tests/integration_tests/test_vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import pytest # type: ignore[import-not-found]
import requests
from chromadb.api.client import SharedSystemClient
from chromadb.api.segment import SegmentAPI
from chromadb.api.types import Embeddable
from langchain_core.documents import Document
from langchain_core.embeddings.fake import FakeEmbeddings as Fak
Expand Down Expand Up @@ -308,8 +309,11 @@ def test_chroma_with_persistence() -> None:
finally:
# Need to stop the chrom system database and segment manager
# to be able to delete the files after testing
docsearch._client._server._sysdb.stop()
docsearch._client._server._manager.stop()
client = docsearch._client
assert isinstance(client, chromadb.ClientCreator)
assert isinstance(client._server, SegmentAPI)
client._server._sysdb.stop()
client._server._manager.stop()


def test_chroma_with_persistence_with_client_settings() -> None:
Expand Down Expand Up @@ -352,8 +356,11 @@ def test_chroma_with_persistence_with_client_settings() -> None:
finally:
# Need to stop the chrom system database and segment manager
# to be able to delete the files after testing
docsearch._client._server._sysdb.stop()
docsearch._client._server._manager.stop()
client = docsearch._client
assert isinstance(client, chromadb.ClientCreator)
assert isinstance(client._server, SegmentAPI)
client._server._sysdb.stop()
client._server._manager.stop()


def test_chroma_mmr() -> None:
Expand Down

0 comments on commit 225c49f

Please sign in to comment.