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