test_validation_error_handling_non_validation_error() — langchain Function Reference
Architecture documentation for the test_validation_error_handling_non_validation_error() function in test_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD eb5c8164_9a32_83b3_7206_9e8963ae44ed["test_validation_error_handling_non_validation_error()"] 8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"] eb5c8164_9a32_83b3_7206_9e8963ae44ed -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555 ac19b2b5_89f9_8e88_c0dd_b3413cf17b81["_parse_input()"] eb5c8164_9a32_83b3_7206_9e8963ae44ed -->|calls| ac19b2b5_89f9_8e88_c0dd_b3413cf17b81 style eb5c8164_9a32_83b3_7206_9e8963ae44ed fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_tools.py lines 918–945
def test_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):
tool_.run({})
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_validation_error_handling_non_validation_error() do?
test_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_validation_error_handling_non_validation_error() defined?
test_validation_error_handling_non_validation_error() is defined in libs/core/tests/unit_tests/test_tools.py at line 918.
What does test_validation_error_handling_non_validation_error() call?
test_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