test_base_blob_parser() — langchain Function Reference
Architecture documentation for the test_base_blob_parser() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6208ca00_fc7e_e680_f07d_13096c48b128["test_base_blob_parser()"] 4065e356_4cef_efc9_e857_ddfbac38b947["test_base.py"] 6208ca00_fc7e_e680_f07d_13096c48b128 -->|defined in| 4065e356_4cef_efc9_e857_ddfbac38b947 fdf31552_7a88_cfa9_7427_b2179bccb4f7["lazy_parse()"] 6208ca00_fc7e_e680_f07d_13096c48b128 -->|calls| fdf31552_7a88_cfa9_7427_b2179bccb4f7 style 6208ca00_fc7e_e680_f07d_13096c48b128 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/document_loaders/test_base.py lines 10–30
def test_base_blob_parser() -> None:
"""Verify that the eager method is hooked up to the lazy method by default."""
class MyParser(BaseBlobParser):
"""A simple parser that returns a single document."""
@override
def lazy_parse(self, blob: Blob) -> Iterator[Document]:
"""Lazy parsing interface."""
yield Document(
page_content="foo",
)
parser = MyParser()
assert isinstance(parser.lazy_parse(Blob(data="who?")), Iterator)
# We're verifying that the eager method is hooked up to the lazy method by default.
docs = parser.parse(Blob(data="who?"))
assert len(docs) == 1
assert docs[0].page_content == "foo"
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_base_blob_parser() do?
test_base_blob_parser() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/document_loaders/test_base.py.
Where is test_base_blob_parser() defined?
test_base_blob_parser() is defined in libs/langchain/tests/unit_tests/document_loaders/test_base.py at line 10.
What does test_base_blob_parser() call?
test_base_blob_parser() calls 1 function(s): lazy_parse.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free