test_async_validation_error_handling_non_validation_error() — langchain Function Reference
Architecture documentation for the test_async_validation_error_handling_non_validation_error() function in test_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b9bab3cd_3acd_21de_17e4_281405c6ed7d["test_async_validation_error_handling_non_validation_error()"] 8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"] b9bab3cd_3acd_21de_17e4_281405c6ed7d -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555 ac19b2b5_89f9_8e88_c0dd_b3413cf17b81["_parse_input()"] b9bab3cd_3acd_21de_17e4_281405c6ed7d -->|calls| ac19b2b5_89f9_8e88_c0dd_b3413cf17b81 style b9bab3cd_3acd_21de_17e4_281405c6ed7d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_tools.py lines 984–1011
async def test_async_validation_error_handling_non_validation_error(
*,
handler: bool | str | Callable[[ValidationError | ValidationErrorV1], str],
) -> None:
"""Test that validation errors are handled correctly."""
class _RaiseNonValidationErrorTool(BaseTool):
name: str = "raise_non_validation_error_tool"
description: str = "A tool that raises a non-validation error"
def _parse_input(
self,
tool_input: str | dict,
tool_call_id: str | None,
) -> str | dict[str, Any]:
raise NotImplementedError
@override
def _run(self) -> str:
return "dummy"
@override
async def _arun(self) -> str:
return "dummy"
tool_ = _RaiseNonValidationErrorTool(handle_validation_error=handler)
with pytest.raises(NotImplementedError):
await tool_.arun({})
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_async_validation_error_handling_non_validation_error() do?
test_async_validation_error_handling_non_validation_error() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_async_validation_error_handling_non_validation_error() defined?
test_async_validation_error_handling_non_validation_error() is defined in libs/core/tests/unit_tests/test_tools.py at line 984.
What does test_async_validation_error_handling_non_validation_error() call?
test_async_validation_error_handling_non_validation_error() calls 1 function(s): _parse_input.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free