test_collection_none_after_delete() — langchain Function Reference
Architecture documentation for the test_collection_none_after_delete() function in test_vectorstores.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9ffca544_f055_63da_e924_3d969654f6ea["test_collection_none_after_delete()"] 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8["test_vectorstores.py"] 9ffca544_f055_63da_e924_3d969654f6ea -->|defined in| 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8 style 9ffca544_f055_63da_e924_3d969654f6ea fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/chroma/tests/integration_tests/test_vectorstores.py lines 774–792
def test_collection_none_after_delete(
client: chromadb.ClientAPI,
) -> None:
"""Tests create_collection_if_not_exists=True and collection non-existing. ."""
vectorstore = Chroma(
client=client,
collection_name="test_collection",
embedding_function=FakeEmbeddings(),
)
assert vectorstore._client.get_collection("test_collection") is not None
vectorstore.delete_collection()
assert vectorstore._chroma_collection is None
with pytest.raises(Exception, match="Chroma collection not initialized"):
_ = vectorstore._collection
with pytest.raises(Exception, match="does not exist"):
vectorstore._client.get_collection("test_collection")
with pytest.raises(Exception): # noqa: B017
vectorstore.similarity_search("foo")
Domain
Subdomains
Source
Frequently Asked Questions
What does test_collection_none_after_delete() do?
test_collection_none_after_delete() is a function in the langchain codebase, defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py.
Where is test_collection_none_after_delete() defined?
test_collection_none_after_delete() is defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py at line 774.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free