langchain/libs/core/tests
Leonid Ganeline 3ef8b24277
core[patch]: utils.guard_import fix (#21133)
Issues (nit): 
1. `utils.guard_import` prints wrong error message when there is an
import `error.` It prints the whole `module_name` but should be only the
first part as the pip package name. E.i. `langchain_core.utils` -> print
not `langchain-core` but `langchain_core.utils`. Also replace '_' with
'-' in the pip package name.
2. it does not handle the `ModuleNotFoundError` which raised if
`guard_import("wrong_module")`

Fixed issues; added ut-s. Controversial: I've reraised
`ModuleNotFoundError` as `ImportError`, since in case of the error, the
proposed action is the same - we need to install a missed package.
2024-05-03 17:21:36 -04:00
..
integration_tests core[patch], langchain[patch]: fix required deps (#14373) 2023-12-07 14:24:58 -08:00
unit_tests core[patch]: utils.guard_import fix (#21133) 2024-05-03 17:21:36 -04:00
__init__.py