Home / Function/ test_exists() — langchain Function Reference

test_exists() — langchain Function Reference

Architecture documentation for the test_exists() function in test_in_memory_record_manager.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  88b9cd2d_3a8d_779a_397b_b1a1fed9a751["test_exists()"]
  0a49adf9_8741_0192_f95b_5cb8cd00ab22["test_in_memory_record_manager.py"]
  88b9cd2d_3a8d_779a_397b_b1a1fed9a751 -->|defined in| 0a49adf9_8741_0192_f95b_5cb8cd00ab22
  style 88b9cd2d_3a8d_779a_397b_b1a1fed9a751 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/indexing/test_in_memory_record_manager.py lines 148–160

def test_exists(manager: InMemoryRecordManager) -> None:
    """Test checking if keys exist in the database."""
    # Insert records
    keys = ["key1", "key2", "key3"]
    manager.update(keys)
    # Check if the keys exist in the database
    exists = manager.exists(keys)
    assert len(exists) == len(keys)
    assert exists == [True, True, True]

    exists = manager.exists(["key1", "key4"])
    assert len(exists) == 2
    assert exists == [True, False]

Subdomains

Frequently Asked Questions

What does test_exists() do?
test_exists() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/indexing/test_in_memory_record_manager.py.
Where is test_exists() defined?
test_exists() is defined in libs/core/tests/unit_tests/indexing/test_in_memory_record_manager.py at line 148.

Analyze Your Own Codebase

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

Try Supermodel Free