langchain/libs/core/tests/unit_tests/utils
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
..
__init__.py
test_function_calling.py Ignore self/cls from required args of class functions in convert_to_openai_tool (#20691) 2024-04-29 11:46:26 -04:00
test_html.py core[patch]: Enhance link extraction with query parameters (#20259) 2024-04-27 02:22:36 +00:00
test_imports.py
test_iter.py
test_json_schema.py core[patch]: fixed circular dependency with json schema (#18657) 2024-03-12 05:42:45 +00:00
test_rm_titles.py core: update _rm_titles to account for title argument name bug (#19036) 2024-03-18 21:25:06 -07:00
test_utils.py core[patch]: utils.guard_import fix (#21133) 2024-05-03 17:21:36 -04:00