test_html_splitter_keep_separator_end() — langchain Function Reference
Architecture documentation for the test_html_splitter_keep_separator_end() function in test_text_splitters.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b1885d9d_2e17_4d60_aea0_841c74f8743c["test_html_splitter_keep_separator_end()"] 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135["test_text_splitters.py"] b1885d9d_2e17_4d60_aea0_841c74f8743c -->|defined in| 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135 style b1885d9d_2e17_4d60_aea0_841c74f8743c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/text-splitters/tests/unit_tests/test_text_splitters.py lines 3919–3945
def test_html_splitter_keep_separator_end() -> None:
"""Test HTML splitting with keep_separator="end"."""
html_content = """
<h1>Section 1</h1>
<p>This is some text. This is some other text.</p>
"""
with suppress_langchain_beta_warning():
splitter = HTMLSemanticPreservingSplitter(
headers_to_split_on=[("h1", "Header 1")],
max_chunk_size=10,
separators=[". "],
keep_separator="end",
)
documents = splitter.split_text(html_content)
expected = [
Document(
page_content="This is some text.",
metadata={"Header 1": "Section 1"},
),
Document(
page_content="This is some other text.",
metadata={"Header 1": "Section 1"},
),
]
assert documents == expected
Domain
Subdomains
Source
Frequently Asked Questions
What does test_html_splitter_keep_separator_end() do?
test_html_splitter_keep_separator_end() is a function in the langchain codebase, defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py.
Where is test_html_splitter_keep_separator_end() defined?
test_html_splitter_keep_separator_end() is defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py at line 3919.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free