test_raise_error_for_bad_decorator() — langchain Function Reference
Architecture documentation for the test_raise_error_for_bad_decorator() function in test_deprecation.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6c2da06f_3f15_6403_d56c_a8bc1ceec08d["test_raise_error_for_bad_decorator()"] 07400ddb_6f57_2ca9_d2d9_e7c7fd98cfc1["test_deprecation.py"] 6c2da06f_3f15_6403_d56c_a8bc1ceec08d -->|defined in| 07400ddb_6f57_2ca9_d2d9_e7c7fd98cfc1 5cb3e9f7_fe1f_68d0_bc1a_910aabafbcc8["deprecated_function()"] 6c2da06f_3f15_6403_d56c_a8bc1ceec08d -->|calls| 5cb3e9f7_fe1f_68d0_bc1a_910aabafbcc8 style 6c2da06f_3f15_6403_d56c_a8bc1ceec08d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/_api/test_deprecation.py lines 404–414
def test_raise_error_for_bad_decorator() -> None:
"""Verify that errors raised on init rather than on use."""
# Should not specify both `alternative` and `alternative_import`
with pytest.raises(
ValueError, match="Cannot specify both alternative and alternative_import"
):
@deprecated(since="2.0.0", alternative="NewClass", alternative_import="hello")
def deprecated_function() -> str:
"""Original doc."""
return "This is a deprecated function."
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_raise_error_for_bad_decorator() do?
test_raise_error_for_bad_decorator() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/_api/test_deprecation.py.
Where is test_raise_error_for_bad_decorator() defined?
test_raise_error_for_bad_decorator() is defined in libs/core/tests/unit_tests/_api/test_deprecation.py at line 404.
What does test_raise_error_for_bad_decorator() call?
test_raise_error_for_bad_decorator() calls 1 function(s): deprecated_function.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free