test_all_providers_registered() — langchain Function Reference
Architecture documentation for the test_all_providers_registered() function in test_registration.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 331ddc3b_ea2e_3a62_e63c_abc4cf131837["test_all_providers_registered()"] 432c927a_b8bc_1bd0_0148_87372a7abd0d["test_registration.py"] 331ddc3b_ea2e_3a62_e63c_abc4cf131837 -->|defined in| 432c927a_b8bc_1bd0_0148_87372a7abd0d style 331ddc3b_ea2e_3a62_e63c_abc4cf131837 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/messages/block_translators/test_registration.py lines 9–29
def test_all_providers_registered() -> None:
"""Test that all block translators implemented in langchain-core are registered.
If this test fails, it is likely that a block translator is implemented but not
registered on import. Check that the provider is included in
`langchain_core.messages.block_translators.__init__._register_translators`.
"""
package_path = (
Path(__file__).parents[4] / "langchain_core" / "messages" / "block_translators"
)
for module_info in pkgutil.iter_modules([str(package_path)]):
module_name = module_info.name
# Skip the __init__ module, any private modules, and `langchain_v0`, which is
# only used to parse v0 multimodal inputs.
if module_name.startswith("_") or module_name == "langchain_v0":
continue
if module_name not in PROVIDER_TRANSLATORS:
pytest.fail(f"Block translator not registered: {module_name}")
Domain
Subdomains
Source
Frequently Asked Questions
What does test_all_providers_registered() do?
test_all_providers_registered() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/messages/block_translators/test_registration.py.
Where is test_all_providers_registered() defined?
test_all_providers_registered() is defined in libs/core/tests/unit_tests/messages/block_translators/test_registration.py at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free