test_create_documents_with_start_index() — langchain Function Reference
Architecture documentation for the test_create_documents_with_start_index() function in test_text_splitters.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD cd0f38f7_8532_2977_9276_6de0797c2fd9["test_create_documents_with_start_index()"] 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135["test_text_splitters.py"] cd0f38f7_8532_2977_9276_6de0797c2fd9 -->|defined in| 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135 style cd0f38f7_8532_2977_9276_6de0797c2fd9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/text-splitters/tests/unit_tests/test_text_splitters.py lines 349–357
def test_create_documents_with_start_index(
splitter: TextSplitter, text: str, expected_docs: list[Document]
) -> None:
"""Test create documents method."""
docs = splitter.create_documents([text])
assert docs == expected_docs
for doc in docs:
s_i = doc.metadata["start_index"]
assert text[s_i : s_i + len(doc.page_content)] == doc.page_content
Domain
Subdomains
Source
Frequently Asked Questions
What does test_create_documents_with_start_index() do?
test_create_documents_with_start_index() is a function in the langchain codebase, defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py.
Where is test_create_documents_with_start_index() defined?
test_create_documents_with_start_index() is defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py at line 349.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free