Home / File/ test_str.py — langchain Source File

test_str.py — langchain Source File

Architecture documentation for test_str.py, a python file in the langchain codebase. 1 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  b10e4a0d_1337_1414_e577_1147a84c5fce["test_str.py"]
  c554676d_b731_47b2_a98f_c1c2d537c0aa["langchain_core.documents"]
  b10e4a0d_1337_1414_e577_1147a84c5fce --> c554676d_b731_47b2_a98f_c1c2d537c0aa
  style b10e4a0d_1337_1414_e577_1147a84c5fce fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from langchain_core.documents import Document


def test_str() -> None:
    assert str(Document(page_content="Hello, World!")) == "page_content='Hello, World!'"
    assert (
        str(Document(page_content="Hello, World!", metadata={"a": 3}))
        == "page_content='Hello, World!' metadata={'a': 3}"
    )


def test_repr() -> None:
    assert (
        repr(Document(page_content="Hello, World!"))
        == "Document(metadata={}, page_content='Hello, World!')"
    )
    assert (
        repr(Document(page_content="Hello, World!", metadata={"a": 3}))
        == "Document(metadata={'a': 3}, page_content='Hello, World!')"
    )

Subdomains

Dependencies

  • langchain_core.documents

Frequently Asked Questions

What does test_str.py do?
test_str.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, RunnableInterface subdomain.
What functions are defined in test_str.py?
test_str.py defines 2 function(s): test_repr, test_str.
What does test_str.py depend on?
test_str.py imports 1 module(s): langchain_core.documents.
Where is test_str.py in the architecture?
test_str.py is located at libs/core/tests/unit_tests/documents/test_str.py (domain: CoreAbstractions, subdomain: RunnableInterface, directory: libs/core/tests/unit_tests/documents).

Analyze Your Own Codebase

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

Try Supermodel Free