test_async_custom_event_implicit_config() — langchain Function Reference
Architecture documentation for the test_async_custom_event_implicit_config() function in test_dispatch_custom_event.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 4a1c5454_2d5a_31a4_9b4e_f1220c75bc41["test_async_custom_event_implicit_config()"] f4cde4a2_4706_d7d1_26f9_82085d97a270["test_dispatch_custom_event.py"] 4a1c5454_2d5a_31a4_9b4e_f1220c75bc41 -->|defined in| f4cde4a2_4706_d7d1_26f9_82085d97a270 style 4a1c5454_2d5a_31a4_9b4e_f1220c75bc41 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/callbacks/test_dispatch_custom_event.py lines 67–88
async def test_async_custom_event_implicit_config() -> None:
"""Test dispatch without passing config explicitly."""
callback = AsyncCustomCallbackHandler()
run_id = uuid.UUID(int=7)
@RunnableLambda
async def foo(x: int, config: RunnableConfig) -> int:
assert "callbacks" in config
await adispatch_custom_event("event1", {"x": x})
await adispatch_custom_event("event2", {"x": x})
return x
await foo.ainvoke(
1,
{"callbacks": [callback], "run_id": run_id},
)
assert callback.events == [
("event1", {"x": 1}, UUID("00000000-0000-0000-0000-000000000007"), [], {}),
("event2", {"x": 1}, UUID("00000000-0000-0000-0000-000000000007"), [], {}),
]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_async_custom_event_implicit_config() do?
test_async_custom_event_implicit_config() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/callbacks/test_dispatch_custom_event.py.
Where is test_async_custom_event_implicit_config() defined?
test_async_custom_event_implicit_config() is defined in libs/core/tests/unit_tests/callbacks/test_dispatch_custom_event.py at line 67.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free