Skip to content

[python] Add mock API tests for service/multiple-services Spector scenario#10258

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-4158
Draft

[python] Add mock API tests for service/multiple-services Spector scenario#10258
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-4158

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

Adds Python SDK mock API tests for the service/multiple-services Spector scenario, which tests that multiple services defined without an explicit @client decorator generate separate root clients.

Changes

  • Dependency bump: @azure-tools/azure-http-specs 0.1.0-alpha.39-dev.40.1.0-alpha.39-dev.8 (first version containing the service/multiple-services spec)
  • regenerate-common.ts: Added service/multiple-services entry with namespace service.multipleservices
  • requirements.txt: Added -e ./generated/service-multiple-services
  • New tests (test_service_multiple_services.py + async counterpart): Validates ServiceAClient.operations.op_a() and ServiceAClient.sub_namespace.sub_op_a() — correct api-version=av2 succeeds (204), wrong api-version=av1 raises HttpResponseError

Note: The Python generator produces only ServiceAClient for this spec (ServiceA scenarios). ServiceB scenarios are not covered as no ServiceBClient is emitted.

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Apr 2, 2026
Copilot AI changed the title [WIP] Add test case for pull request 4158 [python] Add mock API tests for service/multiple-services Spector scenario Apr 2, 2026
Copilot AI requested a review from msyyc April 2, 2026 22:57
Copilot finished work on behalf of msyyc April 2, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[python] add test case for https://github.com/Azure/typespec-azure/pull/4158

2 participants