Home / File/ test_imports.py — langchain Source File

test_imports.py — langchain Source File

Architecture documentation for test_imports.py, a python file in the langchain codebase. 2 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  9227aa41_bda9_600a_3ba8_de80687f3300["test_imports.py"]
  2ceb1686_0f8c_8ae0_36d1_7c0b702fda1c["langchain_core.runnables"]
  9227aa41_bda9_600a_3ba8_de80687f3300 --> 2ceb1686_0f8c_8ae0_36d1_7c0b702fda1c
  81c04601_d095_a27d_4af1_55e771bb2b6b["langchain_core.runnables.utils"]
  9227aa41_bda9_600a_3ba8_de80687f3300 --> 81c04601_d095_a27d_4af1_55e771bb2b6b
  style 9227aa41_bda9_600a_3ba8_de80687f3300 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from langchain_core.runnables import __all__

EXPECTED_ALL = [
    "chain",
    "AddableDict",
    "ConfigurableField",
    "ConfigurableFieldSingleOption",
    "ConfigurableFieldMultiOption",
    "ConfigurableFieldSpec",
    "ensure_config",
    "run_in_executor",
    "patch_config",
    "RouterInput",
    "RouterRunnable",
    "Runnable",
    "RunnableSerializable",
    "RunnableBinding",
    "RunnableBranch",
    "RunnableConfig",
    "RunnableGenerator",
    "RunnableLambda",
    "RunnableMap",
    "RunnableParallel",
    "RunnablePassthrough",
    "RunnableAssign",
    "RunnablePick",
    "RunnableSequence",
    "RunnableWithFallbacks",
    "RunnableWithMessageHistory",
    "get_config_list",
    "aadd",
    "add",
]


def test_all_imports() -> None:
    assert set(__all__) == set(EXPECTED_ALL)


def test_imports_for_specific_funcs() -> None:
    """Test that a few specific imports in more internal namespaces."""
    # create_model implementation has been moved to langchain_core.utils.pydantic
    from langchain_core.runnables.utils import (  # type: ignore[attr-defined] # noqa: F401,PLC0415
        create_model,
    )

Subdomains

Dependencies

  • langchain_core.runnables
  • langchain_core.runnables.utils

Frequently Asked Questions

What does test_imports.py do?
test_imports.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_imports.py?
test_imports.py defines 2 function(s): test_all_imports, test_imports_for_specific_funcs.
What does test_imports.py depend on?
test_imports.py imports 2 module(s): langchain_core.runnables, langchain_core.runnables.utils.
Where is test_imports.py in the architecture?
test_imports.py is located at libs/core/tests/unit_tests/runnables/test_imports.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