Home / Function/ test_whole_class_beta() — langchain Function Reference

test_whole_class_beta() — langchain Function Reference

Architecture documentation for the test_whole_class_beta() function in test_beta_decorator.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  169b19bd_81cb_f601_59cc_ef59d571f611["test_whole_class_beta()"]
  af0bb3cc_9182_00c9_fc61_39029170b37e["test_beta_decorator.py"]
  169b19bd_81cb_f601_59cc_ef59d571f611 -->|defined in| af0bb3cc_9182_00c9_fc61_39029170b37e
  33df2ed1_85c9_dac9_5d92_a75fb085e76c["beta_method()"]
  169b19bd_81cb_f601_59cc_ef59d571f611 -->|calls| 33df2ed1_85c9_dac9_5d92_a75fb085e76c
  style 169b19bd_81cb_f601_59cc_ef59d571f611 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/_api/test_beta_decorator.py lines 248–280

def test_whole_class_beta() -> None:
    """Test whole class beta status."""

    @beta()
    class BetaClass:
        def __init__(self) -> None:
            """Original doc."""

        @beta()
        def beta_method(self) -> str:
            """Original doc."""
            return "This is a beta method."

    with warnings.catch_warnings(record=True) as warning_list:
        warnings.simplefilter("always")

        obj = BetaClass()
        assert obj.beta_method() == "This is a beta method."

        assert len(warning_list) == 2
        warning = warning_list[0].message
        assert str(warning) == (
            "The class `test_whole_class_beta.<locals>.BetaClass` is in beta. "
            "It is actively being worked on, so the "
            "API may change."
        )

        warning = warning_list[1].message
        assert str(warning) == (
            "The method `test_whole_class_beta.<locals>.BetaClass.beta_method` "
            "is in beta. It is actively being worked on, so "
            "the API may change."
        )

Subdomains

Frequently Asked Questions

What does test_whole_class_beta() do?
test_whole_class_beta() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/_api/test_beta_decorator.py.
Where is test_whole_class_beta() defined?
test_whole_class_beta() is defined in libs/core/tests/unit_tests/_api/test_beta_decorator.py at line 248.
What does test_whole_class_beta() call?
test_whole_class_beta() calls 1 function(s): beta_method.

Analyze Your Own Codebase

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

Try Supermodel Free