Home / Function/ test_init() — langchain Function Reference

test_init() — langchain Function Reference

Architecture documentation for the test_init() function in test_document.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  b7a1bc5c_2824_5d02_7592_7dbe68368564["test_init()"]
  3c65b25f_35ac_b9aa_b384_d28d64753664["test_document.py"]
  b7a1bc5c_2824_5d02_7592_7dbe68368564 -->|defined in| 3c65b25f_35ac_b9aa_b384_d28d64753664
  style b7a1bc5c_2824_5d02_7592_7dbe68368564 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/documents/test_document.py lines 4–12

def test_init() -> None:
    for doc in [
        Document(page_content="foo"),
        Document(page_content="foo", metadata={"a": 1}),
        Document(page_content="foo", id=None),
        Document(page_content="foo", id="1"),
        Document(page_content="foo", id=1),
    ]:
        assert isinstance(doc, Document)

Subdomains

Frequently Asked Questions

What does test_init() do?
test_init() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/documents/test_document.py.
Where is test_init() defined?
test_init() is defined in libs/core/tests/unit_tests/documents/test_document.py at line 4.

Analyze Your Own Codebase

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

Try Supermodel Free