test_multiple_params_multiple_variants() — anthropic-sdk-python Function Reference
Architecture documentation for the test_multiple_params_multiple_variants() function in test_required_args.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 2c795d4a_0d22_01cb_cbc1_fe322eab5e19["test_multiple_params_multiple_variants()"] a9d2f3dc_69b2_2afa_7833_2678e5a5db71["test_required_args.py"] 2c795d4a_0d22_01cb_cbc1_fe322eab5e19 -->|defined in| a9d2f3dc_69b2_2afa_7833_2678e5a5db71 style 2c795d4a_0d22_01cb_cbc1_fe322eab5e19 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_required_args.py lines 89–111
def test_multiple_params_multiple_variants() -> None:
@required_args(["a", "b"], ["c"])
def foo(*, a: str | None = None, b: str | None = None, c: str | None = None) -> str | None:
if a is not None:
return a
if b is not None:
return b
return c
error_message = r"Missing required arguments; Expected either \('a' and 'b'\) or \('c'\) arguments to be given"
with pytest.raises(TypeError, match=error_message):
foo(a="foo")
with pytest.raises(TypeError, match=error_message):
foo(b="bar")
with pytest.raises(TypeError, match=error_message):
foo()
assert foo(a=None, b="bar") == "bar"
assert foo(c=None) is None
assert foo(c="foo") == "foo"
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_multiple_params_multiple_variants() do?
test_multiple_params_multiple_variants() is a function in the anthropic-sdk-python codebase, defined in tests/test_required_args.py.
Where is test_multiple_params_multiple_variants() defined?
test_multiple_params_multiple_variants() is defined in tests/test_required_args.py at line 89.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free