Home / Function/ test_deprecated_async_method() — langchain Function Reference

test_deprecated_async_method() — langchain Function Reference

Architecture documentation for the test_deprecated_async_method() function in test_deprecation.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  84f3505d_6df8_913c_30a2_ccd4798c5f44["test_deprecated_async_method()"]
  07400ddb_6f57_2ca9_d2d9_e7c7fd98cfc1["test_deprecation.py"]
  84f3505d_6df8_913c_30a2_ccd4798c5f44 -->|defined in| 07400ddb_6f57_2ca9_d2d9_e7c7fd98cfc1
  884a0e2d_c0a2_96e9_b976_2ca53aa59c82["deprecated_async_method()"]
  84f3505d_6df8_913c_30a2_ccd4798c5f44 -->|calls| 884a0e2d_c0a2_96e9_b976_2ca53aa59c82
  style 84f3505d_6df8_913c_30a2_ccd4798c5f44 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/_api/test_deprecation.py lines 181–200

async def test_deprecated_async_method() -> None:
    """Test deprecated async method."""
    with warnings.catch_warnings(record=True) as warning_list:
        warnings.simplefilter("always")
        obj = ClassWithDeprecatedMethods()
        assert (
            await obj.deprecated_async_method() == "This is a deprecated async method."
        )
        assert len(warning_list) == 1
        warning = warning_list[0].message
        assert str(warning) == (
            "The method `ClassWithDeprecatedMethods.deprecated_async_method` was "
            "deprecated in tests 2.0.0 and will be removed in 3.0.0"
        )

        doc = obj.deprecated_method.__doc__
        assert isinstance(doc, str)
        assert doc.startswith("!!! deprecated")

    assert inspect.iscoroutinefunction(obj.deprecated_async_method)

Subdomains

Frequently Asked Questions

What does test_deprecated_async_method() do?
test_deprecated_async_method() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/_api/test_deprecation.py.
Where is test_deprecated_async_method() defined?
test_deprecated_async_method() is defined in libs/core/tests/unit_tests/_api/test_deprecation.py at line 181.
What does test_deprecated_async_method() call?
test_deprecated_async_method() calls 1 function(s): deprecated_async_method.

Analyze Your Own Codebase

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

Try Supermodel Free