Home / File/ __init__.py — langchain Source File

__init__.py — langchain Source File

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

File python CoreAbstractions MessageSchema 4 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  dd602f89_3b60_f726_aa29_c655f5662de7["__init__.py"]
  120e2591_3e15_b895_72b6_cb26195e40a6["pytest"]
  dd602f89_3b60_f726_aa29_c655f5662de7 --> 120e2591_3e15_b895_72b6_cb26195e40a6
  f0fc804e_af3f_d556_3520_70c5ea4dae59["langchain_tests.unit_tests.chat_models"]
  dd602f89_3b60_f726_aa29_c655f5662de7 --> f0fc804e_af3f_d556_3520_70c5ea4dae59
  2fbe8eb1_5f30_3412_8f93_d0622486af65["langchain_tests.unit_tests.embeddings"]
  dd602f89_3b60_f726_aa29_c655f5662de7 --> 2fbe8eb1_5f30_3412_8f93_d0622486af65
  60d162dc_cc35_1cd7_6481_1b6cf6f9dfc8["langchain_tests.unit_tests.tools"]
  dd602f89_3b60_f726_aa29_c655f5662de7 --> 60d162dc_cc35_1cd7_6481_1b6cf6f9dfc8
  style dd602f89_3b60_f726_aa29_c655f5662de7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"""Unit tests for LangChain components."""

# ruff: noqa: E402
import pytest

# Rewrite assert statements for test suite so that implementations can
# see the full error message from failed asserts.
# https://docs.pytest.org/en/7.1.x/how-to/writing_plugins.html#assertion-rewriting
modules = [
    "chat_models",
    "embeddings",
    "tools",
]

for module in modules:
    pytest.register_assert_rewrite(f"langchain_tests.unit_tests.{module}")

from langchain_tests.unit_tests.chat_models import ChatModelUnitTests
from langchain_tests.unit_tests.embeddings import EmbeddingsUnitTests
from langchain_tests.unit_tests.tools import ToolsUnitTests

__all__ = ["ChatModelUnitTests", "EmbeddingsUnitTests", "ToolsUnitTests"]

Subdomains

Functions

Dependencies

  • langchain_tests.unit_tests.chat_models
  • langchain_tests.unit_tests.embeddings
  • langchain_tests.unit_tests.tools
  • pytest

Frequently Asked Questions

What does __init__.py do?
__init__.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, MessageSchema subdomain.
What functions are defined in __init__.py?
__init__.py defines 1 function(s): pytest.
What does __init__.py depend on?
__init__.py imports 4 module(s): langchain_tests.unit_tests.chat_models, langchain_tests.unit_tests.embeddings, langchain_tests.unit_tests.tools, pytest.
Where is __init__.py in the architecture?
__init__.py is located at libs/standard-tests/langchain_tests/unit_tests/__init__.py (domain: CoreAbstractions, subdomain: MessageSchema, directory: libs/standard-tests/langchain_tests/unit_tests).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free