Home / Function/ test_basic_functionality() — langchain Function Reference

test_basic_functionality() — langchain Function Reference

Architecture documentation for the test_basic_functionality() function in test_combined_memory.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  c00ba061_99ed_f2c5_8239_da3efe05c852["test_basic_functionality()"]
  28e8333d_97e4_bc1a_7136_6d07eb21bbdf["test_combined_memory.py"]
  c00ba061_99ed_f2c5_8239_da3efe05c852 -->|defined in| 28e8333d_97e4_bc1a_7136_6d07eb21bbdf
  style c00ba061_99ed_f2c5_8239_da3efe05c852 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/memory/test_combined_memory.py lines 18–32

def test_basic_functionality(example_memory: list[ConversationBufferMemory]) -> None:
    """Test basic functionality of methods exposed by class."""
    combined_memory = CombinedMemory(memories=[example_memory[0], example_memory[1]])
    assert combined_memory.memory_variables == ["foo", "bar"]
    assert combined_memory.load_memory_variables({}) == {"foo": "", "bar": ""}
    combined_memory.save_context(
        {"input": "Hello there"},
        {"output": "Hello, how can I help you?"},
    )
    assert combined_memory.load_memory_variables({}) == {
        "foo": "Human: Hello there\nAI: Hello, how can I help you?",
        "bar": "Human: Hello there\nAI: Hello, how can I help you?",
    }
    combined_memory.clear()
    assert combined_memory.load_memory_variables({}) == {"foo": "", "bar": ""}

Domain

Subdomains

Frequently Asked Questions

What does test_basic_functionality() do?
test_basic_functionality() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/memory/test_combined_memory.py.
Where is test_basic_functionality() defined?
test_basic_functionality() is defined in libs/langchain/tests/unit_tests/memory/test_combined_memory.py at line 18.

Analyze Your Own Codebase

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

Try Supermodel Free