Skip to content

[python] Add mock API tests for Azure/typespec-azure PR #4959 Spector scenarios - #11410

Merged
Yuchao Yan (msyyc) merged 5 commits into
mainfrom
copilot/add-test-case-for-4959
Aug 18, 2026
Merged

[python] Add mock API tests for Azure/typespec-azure PR #4959 Spector scenarios#11410
Yuchao Yan (msyyc) merged 5 commits into
mainfrom
copilot/add-test-case-for-4959

Conversation

Copilot AI commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Adds Python SDK mock API tests for new Spector scenarios introduced in Azure/typespec-azure#4959.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

…Spector specs

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
@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 Jul 27, 2026
…ientApiVersions

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test case for pull request 4959 [python] Add mock API tests for Azure/typespec-azure PR #4959 Spector scenarios Jul 27, 2026
Copilot AI requested a review from Yuchao Yan (msyyc) July 27, 2026 09:22
@microsoft-github-policy-service microsoft-github-policy-service Bot added the stale Mark a PR that hasn't been recently updated and will be closed. label Aug 11, 2026
@msyyc Yuchao Yan (msyyc) removed the stale Mark a PR that hasn't been recently updated and will be closed. label Aug 14, 2026
@msyyc

Copy link
Copy Markdown
Contributor

Copilot resolve the merge conflicts in this pull request

…-for-4959

# Conflicts:
#	packages/http-client-python/package-lock.json
#	packages/http-client-python/package.json
#	packages/http-client-python/tests/mock_api/azure/asynctests/test_azure_arm_operationtemplates_async.py
#	packages/http-client-python/tests/mock_api/azure/test_azure_arm_operationtemplates.py

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts with main in merge commit a069aa5c0. The focused Azure Python generator suite passes all 46 selected tests.

@pkg-pr-new

pkg-pr-new Bot commented Aug 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-python@11410

commit: ed81b78

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new Python mock API coverage for the @clientApiVersions Spector scenario (sync + async), and records the addition via a Chronus changelog entry. This fits into the http-client-python test suite’s ongoing coverage of Spector scenarios to validate generated SDK behavior against the mock server.

Changes:

  • Added a sync mock API pytest covering ClientApiVersionsClient.send_api_version() with an older api_version.
  • Added an async counterpart test using pytest-asyncio.
  • Added a .chronus/changes entry documenting the new mock API test coverage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/http-client-python/tests/mock_api/azure/test_azure_client_generator_core_api_version_client_api_versions.py New sync mock API test for the @clientApiVersions scenario.
packages/http-client-python/tests/mock_api/azure/asynctests/test_azure_client_generator_core_api_version_client_api_versions_async.py New async mock API test mirroring the sync scenario.
.chronus/changes/python-spector-tests-arm-optemplate-clientapiversions-2026-7-27-8-55-0.md Changelog entry documenting the added mock API tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

@typespec/http-client-python - internal ✏️

Add mock API tests for new Spector scenarios: ARM operation templates (Legacy RoutedOperations, LRO on GET, POST LRO with paging body, POST action paging, markAsPageable) and @clientApiVersions decorator

@github-actions

Copy link
Copy Markdown
Contributor

Python emitter diff

Baseline gh:5ccc2fe184d8983a3db15f1b728dcbc7681f66b9 vs this PR.

No changes to generated output.

Rendered diff: inline on the run summary, or the emitter-diff-html artifact.

Informational check (eng/emitter-diff); does not block the PR.

@azure-sdk-automation

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@msyyc
Yuchao Yan (msyyc) added this pull request to the merge queue Aug 18, 2026
Merged via the queue into main with commit 0e2a700 Aug 18, 2026
43 checks passed
@msyyc
Yuchao Yan (msyyc) deleted the copilot/add-test-case-for-4959 branch August 18, 2026 07:58
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/4959

4 participants