Home / Function/ test_validation_error_handling_callable() — langchain Function Reference

test_validation_error_handling_callable() — langchain Function Reference

Architecture documentation for the test_validation_error_handling_callable() function in test_tools.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  b2bacb92_8590_6f0a_0dfa_355a1f18b5b7["test_validation_error_handling_callable()"]
  8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"]
  b2bacb92_8590_6f0a_0dfa_355a1f18b5b7 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555
  style b2bacb92_8590_6f0a_0dfa_355a1f18b5b7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 898–907

def test_validation_error_handling_callable() -> None:
    """Test that validation errors are handled correctly."""
    expected = "foo bar"

    def handling(e: ValidationError | ValidationErrorV1) -> str:
        return expected

    tool_ = _MockStructuredTool(handle_validation_error=handling)
    actual = tool_.run({})
    assert expected == actual

Domain

Subdomains

Frequently Asked Questions

What does test_validation_error_handling_callable() do?
test_validation_error_handling_callable() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_validation_error_handling_callable() defined?
test_validation_error_handling_callable() is defined in libs/core/tests/unit_tests/test_tools.py at line 898.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free