Enable skipped Python SDK mock API tests after TCGC 0.67.0 upgrade#10302
Merged
Enable skipped Python SDK mock API tests after TCGC 0.67.0 upgrade#10302
Conversation
…emove obsolete spread_record_discriminated_union tests Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/043fdd42-c357-4906-9025-d3b0605ba1c4 Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
msyyc
April 8, 2026 09:04
View session
ChenxiJiang333
approved these changes
Apr 8, 2026
Collaborator
|
You can try these changes here
|
commit: |
Contributor
|
All changed packages have been documented.
Show changes
|
msyyc
added a commit
that referenced
this pull request
Apr 9, 2026
…10302) ## Summary Enable previously skipped Python SDK mock API tests and update them to match the current generated SDK API surface. ## Changes ### Client structure tests (8 tests: 4 sync + 4 async) - Removed `@pytest.mark.skip` decorator — the TCGC version requirement (≥ 0.67.0) is now met - Updated test code to match the new SDK API surface where operations are now accessed through operation groups: - `RenamedOperationClient`: `client.renamed_two()` → `client.group.renamed_two()` (and similar for `renamed_four`, `renamed_six`) - `TwoOperationGroupClient`: `client.one()` → `client.group1.one()`, `client.two()` → `client.group2.two()` (etc.) - `FirstClient`: `client.two()` → `client.group3.two()`, `client.four()` → `client.group4.four()` (etc.) - `SecondClient`: `client.six()` → `client.group5.six()` - Cleaned up unused `import pytest` statements ### Spread record discriminated union tests (2 tests: 1 sync + 1 async) - Removed `test_spread_record_discriminated_union` test functions entirely since the Spector scenario (`SpreadRecordForDiscriminatedUnion`) was removed from `@typespec/http-specs` per [PR #6425](#6425) ### Discriminated union tests (unchanged) - These remain skipped (`@pytest.mark.skip`) as the Python SDK generator doesn't yet support discriminated union serialization/deserialization ## Validation - All client structure tests (12 total: sync + async) pass locally against the Spector mock server - All additional properties tests (62 total) pass after removing the obsolete test Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enable previously skipped Python SDK mock API tests and update them to match the current generated SDK API surface.
Changes
Client structure tests (8 tests: 4 sync + 4 async)
@pytest.mark.skipdecorator — the TCGC version requirement (≥ 0.67.0) is now metRenamedOperationClient:client.renamed_two()→client.group.renamed_two()(and similar forrenamed_four,renamed_six)TwoOperationGroupClient:client.one()→client.group1.one(),client.two()→client.group2.two()(etc.)FirstClient:client.two()→client.group3.two(),client.four()→client.group4.four()(etc.)SecondClient:client.six()→client.group5.six()import pyteststatementsSpread record discriminated union tests (2 tests: 1 sync + 1 async)
test_spread_record_discriminated_uniontest functions entirely since the Spector scenario (SpreadRecordForDiscriminatedUnion) was removed from@typespec/http-specsper PR #6425Discriminated union tests (unchanged)
@pytest.mark.skip) as the Python SDK generator doesn't yet support discriminated union serialization/deserializationValidation