test_traceable_to_tracing() — langchain Function Reference
Architecture documentation for the test_traceable_to_tracing() function in test_base_tracer.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a7cf89ff_6488_bb28_4b39_4b673b0ed3a7["test_traceable_to_tracing()"] 013f89c1_4436_b008_1552_7a3ea97dace9["test_base_tracer.py"] a7cf89ff_6488_bb28_4b39_4b673b0ed3a7 -->|defined in| 013f89c1_4436_b008_1552_7a3ea97dace9 33590781_6996_0c05_af8f_aec11ee0bb29["_get_mock_client()"] a7cf89ff_6488_bb28_4b39_4b673b0ed3a7 -->|calls| 33590781_6996_0c05_af8f_aec11ee0bb29 style a7cf89ff_6488_bb28_4b39_4b673b0ed3a7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/tracers/test_base_tracer.py lines 624–645
def test_traceable_to_tracing() -> None:
has_children = False
def _collect_run(run: Any) -> None:
nonlocal has_children
has_children = bool(run.child_runs)
@as_runnable
def foo(x: int) -> int:
return x + 1
@traceable
def some_parent(a: int, b: int) -> int:
return foo.invoke(a) + foo.invoke(b)
mock_client_ = _get_mock_client()
with langsmith.run_helpers.tracing_context(enabled=True):
result = some_parent(
1, 2, langsmith_extra={"client": mock_client_, "on_end": _collect_run}
)
assert result == 5
assert has_children, "Child run not collected"
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_traceable_to_tracing() do?
test_traceable_to_tracing() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/tracers/test_base_tracer.py.
Where is test_traceable_to_tracing() defined?
test_traceable_to_tracing() is defined in libs/core/tests/unit_tests/tracers/test_base_tracer.py at line 624.
What does test_traceable_to_tracing() call?
test_traceable_to_tracing() calls 1 function(s): _get_mock_client.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free