test_importing.py — langchain Source File
Architecture documentation for test_importing.py, a python file in the langchain codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR b6ceeb4b_20ea_e7cf_cb93_cb6a0f59e71e["test_importing.py"] 08178bdb_6c65_826c_3c07_1e849fcde175["langchain_classic._api.module_import"] b6ceeb4b_20ea_e7cf_cb93_cb6a0f59e71e --> 08178bdb_6c65_826c_3c07_1e849fcde175 6a98b0a5_5607_0043_2e22_a46a464c2d62["langchain_core.documents"] b6ceeb4b_20ea_e7cf_cb93_cb6a0f59e71e --> 6a98b0a5_5607_0043_2e22_a46a464c2d62 style b6ceeb4b_20ea_e7cf_cb93_cb6a0f59e71e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from langchain_classic._api.module_import import create_importer
def test_import_from_non_deprecated_path() -> None:
"""Test importing all modules in langchain."""
module_lookup = {
"Document": "langchain_core.documents",
}
lookup = create_importer(__package__, module_lookup=module_lookup)
imported_doc = lookup("Document")
from langchain_core.documents import Document
assert imported_doc is Document
def test_import_from_deprecated_path() -> None:
"""Test importing all modules in langchain."""
module_lookup = {
"Document": "langchain_core.documents",
}
lookup = create_importer(__package__, deprecated_lookups=module_lookup)
imported_doc = lookup("Document")
from langchain_core.documents import Document
assert imported_doc is Document
def test_import_using_fallback_module() -> None:
"""Test import using fallback module."""
lookup = create_importer(__package__, fallback_module="langchain_core.documents")
imported_doc = lookup("Document")
from langchain_core.documents import Document
assert imported_doc is Document
Domain
Subdomains
Functions
Dependencies
- langchain_classic._api.module_import
- langchain_core.documents
Source
Frequently Asked Questions
What does test_importing.py do?
test_importing.py is a source file in the langchain codebase, written in python. It belongs to the LangChainCore domain, ApiManagement subdomain.
What functions are defined in test_importing.py?
test_importing.py defines 3 function(s): test_import_from_deprecated_path, test_import_from_non_deprecated_path, test_import_using_fallback_module.
What does test_importing.py depend on?
test_importing.py imports 2 module(s): langchain_classic._api.module_import, langchain_core.documents.
Where is test_importing.py in the architecture?
test_importing.py is located at libs/langchain/tests/unit_tests/_api/test_importing.py (domain: LangChainCore, subdomain: ApiManagement, directory: libs/langchain/tests/unit_tests/_api).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free