test_extract_sub_links_base() — langchain Function Reference
Architecture documentation for the test_extract_sub_links_base() function in test_html.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD d028586f_a9a1_4747_83d6_8e0a7fcfb3a4["test_extract_sub_links_base()"] 89d29efc_3f6a_dceb_4c69_b201fa975bdd["test_html.py"] d028586f_a9a1_4747_83d6_8e0a7fcfb3a4 -->|defined in| 89d29efc_3f6a_dceb_4c69_b201fa975bdd style d028586f_a9a1_4747_83d6_8e0a7fcfb3a4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/utils/test_html.py lines 107–129
def test_extract_sub_links_base() -> None:
html = (
'<a href="https://foobar.com">one</a>'
'<a href="http://baz.net">two</a>'
'<a href="//foobar.com/hello">three</a>'
'<a href="/how/are/you/doing">four</a>'
'<a href="alexis.html"</a>'
)
expected = sorted(
[
"https://foobar.com",
"https://foobar.com/hello",
"https://foobar.com/how/are/you/doing",
"https://foobar.com/hello/alexis.html",
]
)
actual = sorted(
extract_sub_links(
html, "https://foobar.com/hello/bill.html", base_url="https://foobar.com"
)
)
assert actual == expected
Domain
Subdomains
Source
Frequently Asked Questions
What does test_extract_sub_links_base() do?
test_extract_sub_links_base() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/utils/test_html.py.
Where is test_extract_sub_links_base() defined?
test_extract_sub_links_base() is defined in libs/core/tests/unit_tests/utils/test_html.py at line 107.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free