Home / Function/ test_html_splitter_with_no_headers() — langchain Function Reference

test_html_splitter_with_no_headers() — langchain Function Reference

Architecture documentation for the test_html_splitter_with_no_headers() function in test_text_splitters.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  c58d2c95_d594_e513_abeb_c36a20ab0be1["test_html_splitter_with_no_headers()"]
  6d6b8ad4_1cfe_fbb0_e58e_76a50487c135["test_text_splitters.py"]
  c58d2c95_d594_e513_abeb_c36a20ab0be1 -->|defined in| 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135
  style c58d2c95_d594_e513_abeb_c36a20ab0be1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/text-splitters/tests/unit_tests/test_text_splitters.py lines 3763–3784

def test_html_splitter_with_no_headers() -> None:
    """Test HTML splitting when there are no headers to split on."""
    html_content = """
    <p>This is content without any headers.</p>
    <p>It should still produce a valid document.</p>
    """
    with suppress_langchain_beta_warning():
        splitter = HTMLSemanticPreservingSplitter(
            headers_to_split_on=[],
            max_chunk_size=1000,
        )
    documents = splitter.split_text(html_content)

    expected = [
        Document(
            page_content="This is content without any headers. It should still produce"
            " a valid document.",
            metadata={},
        ),
    ]

    assert documents == expected

Domain

Subdomains

Frequently Asked Questions

What does test_html_splitter_with_no_headers() do?
test_html_splitter_with_no_headers() is a function in the langchain codebase, defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py.
Where is test_html_splitter_with_no_headers() defined?
test_html_splitter_with_no_headers() is defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py at line 3763.

Analyze Your Own Codebase

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

Try Supermodel Free