Home / Function/ test_multiple_params() — anthropic-sdk-python Function Reference

test_multiple_params() — anthropic-sdk-python Function Reference

Architecture documentation for the test_multiple_params() function in test_required_args.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  0071712f_cd98_32c0_c12e_559f8db73a7e["test_multiple_params()"]
  a9d2f3dc_69b2_2afa_7833_2678e5a5db71["test_required_args.py"]
  0071712f_cd98_32c0_c12e_559f8db73a7e -->|defined in| a9d2f3dc_69b2_2afa_7833_2678e5a5db71
  style 0071712f_cd98_32c0_c12e_559f8db73a7e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_required_args.py lines 43–68

def test_multiple_params() -> None:
    @required_args(["a", "b", "c"])
    def foo(a: str = "", *, b: str = "", c: str = "") -> str | None:
        return f"{a} {b} {c}"

    assert foo(a="a", b="b", c="c") == "a b c"

    error_message = r"Missing required arguments.*"

    with pytest.raises(TypeError, match=error_message):
        foo()

    with pytest.raises(TypeError, match=error_message):
        foo(a="a")

    with pytest.raises(TypeError, match=error_message):
        foo(b="b")

    with pytest.raises(TypeError, match=error_message):
        foo(c="c")

    with pytest.raises(TypeError, match=r"Missing required argument: 'a'"):
        foo(b="a", c="c")

    with pytest.raises(TypeError, match=r"Missing required argument: 'b'"):
        foo("a", c="c")

Subdomains

Frequently Asked Questions

What does test_multiple_params() do?
test_multiple_params() is a function in the anthropic-sdk-python codebase, defined in tests/test_required_args.py.
Where is test_multiple_params() defined?
test_multiple_params() is defined in tests/test_required_args.py at line 43.

Analyze Your Own Codebase

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

Try Supermodel Free