Home / Function/ test_all_models_built() — langchain Function Reference

test_all_models_built() — langchain Function Reference

Architecture documentation for the test_all_models_built() function in test_pydantic_imports.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  6906f559_4256_f0e8_44d5_c7cc89f3598e["test_all_models_built()"]
  cb5b5ca9_ab80_ac5e_0a5d_085cecdc15b7["test_pydantic_imports.py"]
  6906f559_4256_f0e8_44d5_c7cc89f3598e -->|defined in| cb5b5ca9_ab80_ac5e_0a5d_085cecdc15b7
  style 6906f559_4256_f0e8_44d5_c7cc89f3598e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_pydantic_imports.py lines 7–24

def test_all_models_built() -> None:
    for path in Path("../core/langchain_core/").glob("*"):
        module_name = path.stem
        if (
            not module_name.startswith(".")
            and path.suffix != ".typed"
            and module_name != "pydantic_v1"
        ):
            module = importlib.import_module("langchain_core." + module_name)
            all_ = getattr(module, "__all__", [])
            for attr_name in all_:
                attr = getattr(module, attr_name)
                try:
                    if issubclass(attr, BaseModel):
                        assert attr.__pydantic_complete__ is True
                except TypeError:
                    # This is expected for non-class attributes
                    pass

Subdomains

Frequently Asked Questions

What does test_all_models_built() do?
test_all_models_built() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_pydantic_imports.py.
Where is test_all_models_built() defined?
test_all_models_built() is defined in libs/core/tests/unit_tests/test_pydantic_imports.py at line 7.

Analyze Your Own Codebase

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

Try Supermodel Free