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 d1fe5bc3_a8c2_daa5_9413_6cad1635adb8["test_base_blob_parser()"] 04353e17_7a2a_a42e_4595_1cfd1500c7e4["test_base.py"] d1fe5bc3_a8c2_daa5_9413_6cad1635adb8 -->|defined in| 04353e17_7a2a_a42e_4595_1cfd1500c7e4 198fed43_66f7_275c_7fb6_ad028d2c7fe5["lazy_parse()"] d1fe5bc3_a8c2_daa5_9413_6cad1635adb8 -->|calls| 198fed43_66f7_275c_7fb6_ad028d2c7fe5 style d1fe5bc3_a8c2_daa5_9413_6cad1635adb8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/document_loaders/test_base.py lines 13–33
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/core/tests/unit_tests/document_loaders/test_base.py.
Where is test_base_blob_parser() defined?
test_base_blob_parser() is defined in libs/core/tests/unit_tests/document_loaders/test_base.py at line 13.
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