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

test_copy_signature() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  03f40259_25ec_24a4_7a63_c1084dfeff11["test_copy_signature()"]
  d53b6c34_1743_a045_4be1_3554ab153964["TestAnthropic"]
  03f40259_25ec_24a4_7a63_c1084dfeff11 -->|defined in| d53b6c34_1743_a045_4be1_3554ab153964
  dfd6a8fe_ecb1_69aa_d309_62f5bf220f3b["test_copy_signature()"]
  dfd6a8fe_ecb1_69aa_d309_62f5bf220f3b -->|calls| 03f40259_25ec_24a4_7a63_c1084dfeff11
  dfd6a8fe_ecb1_69aa_d309_62f5bf220f3b["test_copy_signature()"]
  03f40259_25ec_24a4_7a63_c1084dfeff11 -->|calls| dfd6a8fe_ecb1_69aa_d309_62f5bf220f3b
  style 03f40259_25ec_24a4_7a63_c1084dfeff11 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_client.py lines 233–247

    def test_copy_signature(self, client: Anthropic) -> None:
        # ensure the same parameters that can be passed to the client are defined in the `.copy()` method
        init_signature = inspect.signature(
            # mypy doesn't like that we access the `__init__` property.
            client.__init__,  # type: ignore[misc]
        )
        copy_signature = inspect.signature(client.copy)
        exclude_params = {"transport", "proxies", "_strict_response_validation"}

        for name in init_signature.parameters.keys():
            if name in exclude_params:
                continue

            copy_param = copy_signature.parameters.get(name)
            assert copy_param is not None, f"copy() signature is missing the {name} param"

Subdomains

Frequently Asked Questions

What does test_copy_signature() do?
test_copy_signature() is a function in the anthropic-sdk-python codebase, defined in tests/test_client.py.
Where is test_copy_signature() defined?
test_copy_signature() is defined in tests/test_client.py at line 233.
What does test_copy_signature() call?
test_copy_signature() calls 1 function(s): test_copy_signature.
What calls test_copy_signature()?
test_copy_signature() is called by 1 function(s): test_copy_signature.

Analyze Your Own Codebase

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

Try Supermodel Free