test_collect_runs() — langchain Function Reference
Architecture documentation for the test_collect_runs() function in test_run_collector.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD fff595c2_4b1b_65c7_66e7_3e3abf57177b["test_collect_runs()"] aa5e5723_6e2d_9b5c_756b_51c9840136a0["test_run_collector.py"] fff595c2_4b1b_65c7_66e7_3e3abf57177b -->|defined in| aa5e5723_6e2d_9b5c_756b_51c9840136a0 style fff595c2_4b1b_65c7_66e7_3e3abf57177b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/tracers/test_run_collector.py lines 9–16
def test_collect_runs() -> None:
model = FakeListLLM(responses=["hello"])
with collect_runs() as cb:
model.invoke("hi")
assert cb.traced_runs
assert len(cb.traced_runs) == 1
assert isinstance(cb.traced_runs[0].id, uuid.UUID)
assert cb.traced_runs[0].inputs == {"prompts": ["hi"]}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_collect_runs() do?
test_collect_runs() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/tracers/test_run_collector.py.
Where is test_collect_runs() defined?
test_collect_runs() is defined in libs/core/tests/unit_tests/tracers/test_run_collector.py at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free