test_runnable.py — langchain Source File
Architecture documentation for test_runnable.py, a python file in the langchain codebase. 42 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 585118f6_af11_96c8_80a2_355dd4705f7f["test_runnable.py"] a327e534_84f6_5308_58ca_5727d5eda0cf["asyncio"] 585118f6_af11_96c8_80a2_355dd4705f7f --> a327e534_84f6_5308_58ca_5727d5eda0cf 67ec3255_645e_8b6e_1eff_1eb3c648ed95["re"] 585118f6_af11_96c8_80a2_355dd4705f7f --> 67ec3255_645e_8b6e_1eff_1eb3c648ed95 d76a28c2_c3ab_00a8_5208_77807a49449d["sys"] 585118f6_af11_96c8_80a2_355dd4705f7f --> d76a28c2_c3ab_00a8_5208_77807a49449d 0c1d9a1b_c553_0388_dbc1_58af49567aa2["time"] 585118f6_af11_96c8_80a2_355dd4705f7f --> 0c1d9a1b_c553_0388_dbc1_58af49567aa2 8dfa0cac_d802_3ccd_f710_43a5e70da3a5["uuid"] 585118f6_af11_96c8_80a2_355dd4705f7f --> 8dfa0cac_d802_3ccd_f710_43a5e70da3a5 0c635125_6987_b8b3_7ff7_d60249aecde7["warnings"] 585118f6_af11_96c8_80a2_355dd4705f7f --> 0c635125_6987_b8b3_7ff7_d60249aecde7 cfe2bde5_180e_e3b0_df2b_55b3ebaca8e7["collections.abc"] 585118f6_af11_96c8_80a2_355dd4705f7f --> cfe2bde5_180e_e3b0_df2b_55b3ebaca8e7 c990f2d7_9509_7cea_ca95_51ad57dbe5c6["functools"] 585118f6_af11_96c8_80a2_355dd4705f7f --> c990f2d7_9509_7cea_ca95_51ad57dbe5c6 7aaf52d4_ee88_411e_980e_bc4beeeb30ad["operator"] 585118f6_af11_96c8_80a2_355dd4705f7f --> 7aaf52d4_ee88_411e_980e_bc4beeeb30ad 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"] 585118f6_af11_96c8_80a2_355dd4705f7f --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3 120e2591_3e15_b895_72b6_cb26195e40a6["pytest"] 585118f6_af11_96c8_80a2_355dd4705f7f --> 120e2591_3e15_b895_72b6_cb26195e40a6 0a0b1957_08a9_6988_c388_b08d8a4c17ad["freezegun"] 585118f6_af11_96c8_80a2_355dd4705f7f --> 0a0b1957_08a9_6988_c388_b08d8a4c17ad 0b794afa_fd3d_a810_77fd_ed00bf90e394["packaging"] 585118f6_af11_96c8_80a2_355dd4705f7f --> 0b794afa_fd3d_a810_77fd_ed00bf90e394 6e58aaea_f08e_c099_3cc7_f9567bfb1ae7["pydantic"] 585118f6_af11_96c8_80a2_355dd4705f7f --> 6e58aaea_f08e_c099_3cc7_f9567bfb1ae7 style 585118f6_af11_96c8_80a2_355dd4705f7f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import asyncio
import re
import sys
import time
import uuid
import warnings
from collections.abc import (
AsyncIterator,
Awaitable,
Callable,
Iterator,
Sequence,
)
from functools import partial
from operator import itemgetter
from typing import Any, cast
from uuid import UUID
import pytest
from freezegun import freeze_time
from packaging import version
from pydantic import BaseModel, Field
from pytest_mock import MockerFixture
from syrupy.assertion import SnapshotAssertion
from typing_extensions import TypedDict, override
from langchain_core.callbacks import BaseCallbackHandler
from langchain_core.callbacks.manager import (
AsyncCallbackManagerForRetrieverRun,
CallbackManagerForRetrieverRun,
atrace_as_chain_group,
trace_as_chain_group,
)
from langchain_core.documents import Document
from langchain_core.language_models import (
FakeListChatModel,
FakeListLLM,
FakeStreamingListLLM,
)
from langchain_core.language_models.fake_chat_models import GenericFakeChatModel
from langchain_core.load import dumpd, dumps
from langchain_core.load.load import loads
from langchain_core.messages import AIMessageChunk, HumanMessage, SystemMessage
from langchain_core.messages.base import BaseMessage
from langchain_core.output_parsers import (
BaseOutputParser,
CommaSeparatedListOutputParser,
StrOutputParser,
)
from langchain_core.outputs.chat_generation import ChatGeneration
from langchain_core.outputs.llm_result import LLMResult
from langchain_core.prompt_values import ChatPromptValue, StringPromptValue
from langchain_core.prompts import (
ChatPromptTemplate,
HumanMessagePromptTemplate,
MessagesPlaceholder,
PromptTemplate,
SystemMessagePromptTemplate,
)
from langchain_core.retrievers import BaseRetriever
// ... (5710 more lines)
Domain
Subdomains
Functions
- test_ainvoke_astream_passthrough_assign_trace()
- test_ainvoke_on_returned_runnable()
- test_astream_log_deep_copies()
- test_async_retry_batch_preserves_order()
- test_async_retrying()
- test_atransform_of_runnable_lambda_with_dicts()
- test_bind_bind()
- test_bind_with_lambda()
- test_bind_with_lambda_async()
- test_closing_iterator_doesnt_raise_error()
- test_combining_sequences()
- test_configurable_alts_factory()
- test_configurable_fields()
- test_configurable_fields_example()
- test_configurable_fields_prefix_keys()
- test_deep_astream()
- test_deep_astream_assign()
- test_deep_stream()
- test_deep_stream_assign()
- test_default_atransform_with_dicts()
- test_default_method_implementations()
- test_default_method_implementations_async()
- test_default_transform_with_dicts()
- test_each()
- test_each_simple()
- test_higher_order_lambda_runnable()
- test_higher_order_lambda_runnable_async()
- test_invoke_stream_passthrough_assign_trace()
- test_lambda_schemas()
- test_listeners()
- test_listeners_async()
- test_map_astream()
- test_map_astream_iterator_input()
- test_map_stream()
- test_map_stream_iterator_input()
- test_metadata_is_merged()
- test_passthrough_assign_schema()
- test_passthrough_atransform_with_dicts()
- test_passthrough_tap()
- test_passthrough_tap_async()
- test_passthrough_transform_with_dicts()
- test_prompt()
- test_prompt_async()
- test_prompt_template_params()
- test_prompt_with_chat_model()
- test_prompt_with_chat_model_and_parser()
- test_prompt_with_chat_model_async()
- test_prompt_with_llm()
- test_prompt_with_llm_and_async_lambda()
- test_prompt_with_llm_parser()
- test_pydantic_protected_namespaces()
- test_recursive_lambda()
- test_representation_of_runnables()
- test_retry_batch_preserves_order()
- test_retrying()
- test_router_runnable()
- test_router_runnable_async()
- test_runnable_assign()
- test_runnable_branch_abatch()
- test_runnable_branch_ainvoke()
- test_runnable_branch_ainvoke_callbacks()
- test_runnable_branch_astream()
- test_runnable_branch_astream_with_callbacks()
- test_runnable_branch_batch()
- test_runnable_branch_init()
- test_runnable_branch_init_coercion()
- test_runnable_branch_invoke()
- test_runnable_branch_invoke_call_counts()
- test_runnable_branch_invoke_callbacks()
- test_runnable_branch_stream()
- test_runnable_branch_stream_with_callbacks()
- test_runnable_gen()
- test_runnable_gen_async()
- test_runnable_gen_context_config()
- test_runnable_gen_context_config_async()
- test_runnable_gen_transform()
- test_runnable_iter_context_config()
- test_runnable_iter_context_config_async()
- test_runnable_lambda_astream()
- test_runnable_lambda_astream_with_callbacks()
- test_runnable_lambda_context_config()
- test_runnable_lambda_context_config_async()
- test_runnable_lambda_stream()
- test_runnable_lambda_stream_with_callbacks()
- test_runnable_sequence_atransform()
- test_runnable_sequence_transform()
- test_runnable_typed_dict_schema()
- test_schema_complex_seq()
- test_schema_for_prompt_and_chat_model()
- test_schema_with_itemgetter()
- test_schemas()
- test_seq_abatch_return_exceptions()
- test_seq_batch_return_exceptions()
- test_seq_dict_prompt_llm()
- test_seq_prompt_dict()
- test_seq_prompt_map()
- test_stream_log_lists()
- test_stream_log_retriever()
- test_tags_are_appended()
- test_tool_from_runnable()
- test_transform_of_runnable_lambda_with_dicts()
- test_with_config()
- test_with_config_async()
- test_with_config_callbacks()
- test_with_config_metadata_passthrough()
- test_with_config_with_config()
- test_with_listener_propagation()
- test_with_listeners()
- test_with_listeners_async()
- test_with_types_with_type_generics()
Classes
Dependencies
- asyncio
- collections.abc
- freezegun
- functools
- langchain_core.callbacks
- langchain_core.callbacks.manager
- langchain_core.documents
- langchain_core.language_models
- langchain_core.language_models.fake_chat_models
- langchain_core.load
- langchain_core.load.load
- langchain_core.messages
- langchain_core.messages.base
- langchain_core.output_parsers
- langchain_core.outputs.chat_generation
- langchain_core.outputs.llm_result
- langchain_core.prompt_values
- langchain_core.prompts
- langchain_core.retrievers
- langchain_core.runnables
- langchain_core.runnables.base
- langchain_core.runnables.utils
- langchain_core.tools
- langchain_core.tracers
- langchain_core.tracers._compat
- langchain_core.tracers.context
- langchain_core.utils.pydantic
- operator
- packaging
- pydantic
- pytest
- pytest_mock
- re
- syrupy.assertion
- sys
- tests.unit_tests.pydantic_utils
- tests.unit_tests.stubs
- time
- typing
- typing_extensions
- uuid
- warnings
Source
Frequently Asked Questions
What does test_runnable.py do?
test_runnable.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, RunnableInterface subdomain.
What functions are defined in test_runnable.py?
test_runnable.py defines 110 function(s): test_ainvoke_astream_passthrough_assign_trace, test_ainvoke_on_returned_runnable, test_astream_log_deep_copies, test_async_retry_batch_preserves_order, test_async_retrying, test_atransform_of_runnable_lambda_with_dicts, test_bind_bind, test_bind_with_lambda, test_bind_with_lambda_async, test_closing_iterator_doesnt_raise_error, and 100 more.
What does test_runnable.py depend on?
test_runnable.py imports 42 module(s): asyncio, collections.abc, freezegun, functools, langchain_core.callbacks, langchain_core.callbacks.manager, langchain_core.documents, langchain_core.language_models, and 34 more.
Where is test_runnable.py in the architecture?
test_runnable.py is located at libs/core/tests/unit_tests/runnables/test_runnable.py (domain: CoreAbstractions, subdomain: RunnableInterface, directory: libs/core/tests/unit_tests/runnables).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free