Home / Function/ test_deleting_bulk_documents_async() — langchain Function Reference

test_deleting_bulk_documents_async() — langchain Function Reference

Architecture documentation for the test_deleting_bulk_documents_async() function in vectorstores.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  4dfd08da_9478_f6ef_9401_6e61dd27f355["test_deleting_bulk_documents_async()"]
  dd52cc1a_cb37_0117_3b1e_0889a7228307["VectorStoreIntegrationTests"]
  4dfd08da_9478_f6ef_9401_6e61dd27f355 -->|defined in| dd52cc1a_cb37_0117_3b1e_0889a7228307
  style 4dfd08da_9478_f6ef_9401_6e61dd27f355 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/standard-tests/langchain_tests/integration_tests/vectorstores.py lines 578–600

    async def test_deleting_bulk_documents_async(
        self, vectorstore: VectorStore
    ) -> None:
        """Test that we can delete several documents at once.

        ??? note "Troubleshooting"

            If this test fails, check that `adelete` correctly removes multiple
            documents when given a list of IDs.
        """
        if not self.has_async:
            pytest.skip("Async tests not supported.")

        documents = [
            Document(page_content="foo", metadata={"id": 1}),
            Document(page_content="bar", metadata={"id": 2}),
            Document(page_content="baz", metadata={"id": 3}),
        ]

        await vectorstore.aadd_documents(documents, ids=["1", "2", "3"])
        await vectorstore.adelete(["1", "2"])
        documents = await vectorstore.asimilarity_search("foo", k=1)
        assert documents == [Document(page_content="baz", metadata={"id": 3}, id="3")]

Domain

Subdomains

Frequently Asked Questions

What does test_deleting_bulk_documents_async() do?
test_deleting_bulk_documents_async() is a function in the langchain codebase, defined in libs/standard-tests/langchain_tests/integration_tests/vectorstores.py.
Where is test_deleting_bulk_documents_async() defined?
test_deleting_bulk_documents_async() is defined in libs/standard-tests/langchain_tests/integration_tests/vectorstores.py at line 578.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free