TestSkills Class — anthropic-sdk-python Architecture
Architecture documentation for the TestSkills class in test_skills.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD f81b4e0f_049d_157c_a821_97a8e45f0509["TestSkills"] 5c7c6a85_9a24_ff7a_8dc6_8f174fab0aec["SkillCreateResponse"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|extends| 5c7c6a85_9a24_ff7a_8dc6_8f174fab0aec c62c6062_1f06_a270_5cc3_cf541699ad23["SkillRetrieveResponse"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|extends| c62c6062_1f06_a270_5cc3_cf541699ad23 4f1e0efd_b524_5d0d_aa53_b25120599ae4["SkillDeleteResponse"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|extends| 4f1e0efd_b524_5d0d_aa53_b25120599ae4 a2c42b3a_a4d5_b289_bfdf_932cd0518801["test_skills.py"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|defined in| a2c42b3a_a4d5_b289_bfdf_932cd0518801 baff3ba4_baa6_65b3_1f6b_956187fd17d8["test_method_create()"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|method| baff3ba4_baa6_65b3_1f6b_956187fd17d8 a7991efc_ab91_b355_f286_8dac4eb252d3["test_method_create_with_all_params()"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|method| a7991efc_ab91_b355_f286_8dac4eb252d3 cee4ec8c_db0a_155f_c361_dad2b7d580ab["test_raw_response_create()"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|method| cee4ec8c_db0a_155f_c361_dad2b7d580ab 3b06d2f3_5872_bd63_b4e1_e22d41f1a73a["test_streaming_response_create()"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|method| 3b06d2f3_5872_bd63_b4e1_e22d41f1a73a 22d82100_585e_2a92_8352_61514fee7a65["test_method_retrieve()"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|method| 22d82100_585e_2a92_8352_61514fee7a65 11daf21e_22aa_02ab_0f96_54cbea073384["test_method_retrieve_with_all_params()"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|method| 11daf21e_22aa_02ab_0f96_54cbea073384 1aba3406_1624_e83c_6dc0_1bc7b97c8025["test_raw_response_retrieve()"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|method| 1aba3406_1624_e83c_6dc0_1bc7b97c8025 50e90860_33c2_e405_a6c5_97f2ba8c3333["test_streaming_response_retrieve()"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|method| 50e90860_33c2_e405_a6c5_97f2ba8c3333 a90c8855_335a_649f_a5d3_1742af3f64f5["test_path_params_retrieve()"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|method| a90c8855_335a_649f_a5d3_1742af3f64f5 e27d24d1_4ce2_20f4_0e60_5f8e8f6ef313["test_method_list()"] f81b4e0f_049d_157c_a821_97a8e45f0509 -->|method| e27d24d1_4ce2_20f4_0e60_5f8e8f6ef313
Relationship Graph
Source Code
tests/api_resources/beta/test_skills.py lines 23–189
class TestSkills:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip(reason="prism binary unsupported")
@parametrize
def test_method_create(self, client: Anthropic) -> None:
skill = client.beta.skills.create()
assert_matches_type(SkillCreateResponse, skill, path=["response"])
@pytest.mark.skip(reason="prism binary unsupported")
@parametrize
def test_method_create_with_all_params(self, client: Anthropic) -> None:
skill = client.beta.skills.create(
display_title="display_title",
files=[b"raw file contents"],
betas=["string"],
)
assert_matches_type(SkillCreateResponse, skill, path=["response"])
@pytest.mark.skip(reason="prism binary unsupported")
@parametrize
def test_raw_response_create(self, client: Anthropic) -> None:
response = client.beta.skills.with_raw_response.create()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
skill = response.parse()
assert_matches_type(SkillCreateResponse, skill, path=["response"])
@pytest.mark.skip(reason="prism binary unsupported")
@parametrize
def test_streaming_response_create(self, client: Anthropic) -> None:
with client.beta.skills.with_streaming_response.create() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
skill = response.parse()
assert_matches_type(SkillCreateResponse, skill, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_retrieve(self, client: Anthropic) -> None:
skill = client.beta.skills.retrieve(
skill_id="skill_id",
)
assert_matches_type(SkillRetrieveResponse, skill, path=["response"])
@parametrize
def test_method_retrieve_with_all_params(self, client: Anthropic) -> None:
skill = client.beta.skills.retrieve(
skill_id="skill_id",
betas=["string"],
)
assert_matches_type(SkillRetrieveResponse, skill, path=["response"])
@parametrize
def test_raw_response_retrieve(self, client: Anthropic) -> None:
response = client.beta.skills.with_raw_response.retrieve(
skill_id="skill_id",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
skill = response.parse()
assert_matches_type(SkillRetrieveResponse, skill, path=["response"])
@parametrize
def test_streaming_response_retrieve(self, client: Anthropic) -> None:
with client.beta.skills.with_streaming_response.retrieve(
skill_id="skill_id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
skill = response.parse()
assert_matches_type(SkillRetrieveResponse, skill, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
Domain
Defined In
Source
Frequently Asked Questions
What is the TestSkills class?
TestSkills is a class in the anthropic-sdk-python codebase, defined in tests/api_resources/beta/test_skills.py.
Where is TestSkills defined?
TestSkills is defined in tests/api_resources/beta/test_skills.py at line 23.
What does TestSkills extend?
TestSkills extends SkillCreateResponse, SkillRetrieveResponse, SkillDeleteResponse.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free