Home / Function/ test_beta_method_pydantic() — langchain Function Reference

test_beta_method_pydantic() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/_api/test_beta_decorator.py lines 362–378

def test_beta_method_pydantic() -> None:
    """Test beta method."""
    with warnings.catch_warnings(record=True) as warning_list:
        warnings.simplefilter("always")
        obj = MyModel()
        assert obj.beta_method() == "This is a beta method."
        assert len(warning_list) == 1
        warning = warning_list[0].message
        assert str(warning) == (
            "The method `MyModel.beta_method` is in beta. It is actively being "
            "worked on, so "
            "the API may change."
        )

        doc = obj.beta_method.__doc__
        assert isinstance(doc, str)
        assert doc.startswith(".. beta::")

Subdomains

Frequently Asked Questions

What does test_beta_method_pydantic() do?
test_beta_method_pydantic() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/_api/test_beta_decorator.py.
Where is test_beta_method_pydantic() defined?
test_beta_method_pydantic() is defined in libs/core/tests/unit_tests/_api/test_beta_decorator.py at line 362.
What does test_beta_method_pydantic() call?
test_beta_method_pydantic() 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