Home / Function/ test_tool_retry_deprecated_return_message_keyword() — langchain Function Reference

test_tool_retry_deprecated_return_message_keyword() — langchain Function Reference

Architecture documentation for the test_tool_retry_deprecated_return_message_keyword() function in test_tool_retry.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ab4f5da9_071c_e5bb_0633_e54490ff37ea["test_tool_retry_deprecated_return_message_keyword()"]
  c71b26df_821f_59ac_c7ef_3b96fcbe0d5b["test_tool_retry.py"]
  ab4f5da9_071c_e5bb_0633_e54490ff37ea -->|defined in| c71b26df_821f_59ac_c7ef_3b96fcbe0d5b
  style ab4f5da9_071c_e5bb_0633_e54490ff37ea fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_retry.py lines 924–939

def test_tool_retry_deprecated_return_message_keyword() -> None:
    """Test tool retry with deprecated 'return_message' keyword.

    Test ToolRetryMiddleware with deprecated 'return_message' keyword shows deprecation
    warning.
    """
    # Use string concatenation to avoid batch replace affecting test code
    deprecated_value = "return" + "_message"
    with pytest.warns(DeprecationWarning, match="on_failure='return_message' is deprecated"):
        retry = ToolRetryMiddleware(
            max_retries=2,
            on_failure=deprecated_value,  # type: ignore[arg-type]
        )

    # Should be converted to 'continue'
    assert retry.on_failure == "continue"

Domain

Subdomains

Frequently Asked Questions

What does test_tool_retry_deprecated_return_message_keyword() do?
test_tool_retry_deprecated_return_message_keyword() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_retry.py.
Where is test_tool_retry_deprecated_return_message_keyword() defined?
test_tool_retry_deprecated_return_message_keyword() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_retry.py at line 924.

Analyze Your Own Codebase

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

Try Supermodel Free