Home / Function/ test_delete_missing_docs() — langchain Function Reference

test_delete_missing_docs() — langchain Function Reference

Architecture documentation for the test_delete_missing_docs() function in indexer.py from the langchain codebase.

Function python LangChainCore Runnables calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  6a3f3e5a_f55a_017e_2d84_11aafdceeb0e["test_delete_missing_docs()"]
  67ebaa9c_263d_69d9_3a75_de0b0ac61588["DocumentIndexerTestSuite"]
  6a3f3e5a_f55a_017e_2d84_11aafdceeb0e -->|defined in| 67ebaa9c_263d_69d9_3a75_de0b0ac61588
  27949a2c_b514_bd18_3625_85f3294944ff["test_delete_missing_docs()"]
  27949a2c_b514_bd18_3625_85f3294944ff -->|calls| 6a3f3e5a_f55a_017e_2d84_11aafdceeb0e
  27949a2c_b514_bd18_3625_85f3294944ff["test_delete_missing_docs()"]
  6a3f3e5a_f55a_017e_2d84_11aafdceeb0e -->|calls| 27949a2c_b514_bd18_3625_85f3294944ff
  style 6a3f3e5a_f55a_017e_2d84_11aafdceeb0e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/standard-tests/langchain_tests/integration_tests/indexer.py lines 114–132

    def test_delete_missing_docs(self, index: DocumentIndex) -> None:
        """Verify that we can delete docs that aren't there."""
        assert index.get(["1"]) == []  # Should be empty.

        delete_response = index.delete(["1"])
        if "num_deleted" in delete_response:
            assert delete_response["num_deleted"] == 0

        if "num_failed" in delete_response:
            # Deleting a missing an ID is **not** failure!!
            assert delete_response["num_failed"] == 0

        if "succeeded" in delete_response:
            # There was nothing to delete!
            assert delete_response["succeeded"] == []

        if "failed" in delete_response:
            # Nothing should have failed
            assert delete_response["failed"] == []

Domain

Subdomains

Frequently Asked Questions

What does test_delete_missing_docs() do?
test_delete_missing_docs() is a function in the langchain codebase, defined in libs/standard-tests/langchain_tests/integration_tests/indexer.py.
Where is test_delete_missing_docs() defined?
test_delete_missing_docs() is defined in libs/standard-tests/langchain_tests/integration_tests/indexer.py at line 114.
What does test_delete_missing_docs() call?
test_delete_missing_docs() calls 1 function(s): test_delete_missing_docs.
What calls test_delete_missing_docs()?
test_delete_missing_docs() is called by 1 function(s): test_delete_missing_docs.

Analyze Your Own Codebase

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

Try Supermodel Free