Home / Function/ test_find_all_links_ignore_prefix() — langchain Function Reference

test_find_all_links_ignore_prefix() — langchain Function Reference

Architecture documentation for the test_find_all_links_ignore_prefix() function in test_html.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  2ca721b3_b01a_a588_5dd9_e36dc01e1d5c["test_find_all_links_ignore_prefix()"]
  89d29efc_3f6a_dceb_4c69_b201fa975bdd["test_html.py"]
  2ca721b3_b01a_a588_5dd9_e36dc01e1d5c -->|defined in| 89d29efc_3f6a_dceb_4c69_b201fa975bdd
  style 2ca721b3_b01a_a588_5dd9_e36dc01e1d5c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/utils/test_html.py lines 50–63

def test_find_all_links_ignore_prefix() -> None:
    html = 'href="{prefix}foobar"'
    for prefix_ in PREFIXES_TO_IGNORE:
        actual = find_all_links(html.format(prefix=prefix_))
        assert actual == []

    # Don't ignore if pattern doesn't occur at beginning of link.
    html = 'href="foobar{prefix}more"'
    for prefix_ in PREFIXES_TO_IGNORE:
        # Pound signs are split on when not prefixes.
        if prefix_ == "#":
            continue
        actual = find_all_links(html.format(prefix=prefix_))
        assert actual == [f"foobar{prefix_}more"]

Domain

Subdomains

Frequently Asked Questions

What does test_find_all_links_ignore_prefix() do?
test_find_all_links_ignore_prefix() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/utils/test_html.py.
Where is test_find_all_links_ignore_prefix() defined?
test_find_all_links_ignore_prefix() is defined in libs/core/tests/unit_tests/utils/test_html.py at line 50.

Analyze Your Own Codebase

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

Try Supermodel Free