test_delete_where_clause() — langchain Function Reference
Architecture documentation for the test_delete_where_clause() function in test_vectorstores.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 1184399d_434a_f400_dbdb_83dbfcac3bca["test_delete_where_clause()"] 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8["test_vectorstores.py"] 1184399d_434a_f400_dbdb_83dbfcac3bca -->|defined in| 289e5a4f_8e2e_ddb6_af2e_804f91dabdb8 style 1184399d_434a_f400_dbdb_83dbfcac3bca fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/chroma/tests/integration_tests/test_vectorstores.py lines 813–830
def test_delete_where_clause(client: chromadb.ClientAPI) -> None:
"""Tests delete_where_clause method."""
vectorstore = Chroma(
client=client,
collection_name="test_collection",
embedding_function=FakeEmbeddings(),
)
vectorstore.add_documents(
[
Document(page_content="foo", metadata={"test": "bar"}),
Document(page_content="bar", metadata={"test": "foo"}),
],
)
assert vectorstore._collection.count() == 2
vectorstore.delete(where={"test": "bar"})
assert vectorstore._collection.count() == 1
# Clean up
vectorstore.delete_collection()
Domain
Subdomains
Source
Frequently Asked Questions
What does test_delete_where_clause() do?
test_delete_where_clause() is a function in the langchain codebase, defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py.
Where is test_delete_where_clause() defined?
test_delete_where_clause() is defined in libs/partners/chroma/tests/integration_tests/test_vectorstores.py at line 813.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free