Skip to content

[Copilot] Add test cases from TypeSpec PR #7693#3107

Merged
msyyc merged 8 commits intomainfrom
copilot/fix-3106
Jun 25, 2025
Merged

[Copilot] Add test cases from TypeSpec PR #7693#3107
msyyc merged 8 commits intomainfrom
copilot/fix-3106

Conversation

Copy link
Contributor

Copilot AI commented Jun 25, 2025

This PR adds test cases from microsoft/typespec#7693 to the autorest.python repository to maintain consistency between the two codebases.

Changes Made

New Test Files Added

  • test_azure_arm_largeheader.py and async version - Tests for large header scenarios
  • test_azure_arm_nonresource.py and async version - Tests for non-resource operations
  • test_azure_client_generator_core_deserialize_empty_string_as_null.py and async version - Tests for empty string deserialization
  • test_azure_encode_duration.py and async version - Tests for Azure-specific duration encoding

Existing Test Files Updated

  • CommonProperties tests: Added error handling test cases for predefined and user-defined errors
  • Client Initialization tests: Added commented parent-child client test cases and ParentClient import
  • Usage tests: Added commented orphan model serialization test cases

Dependencies Updated

  • Updated requirements.txt to include new package dependencies:
    • azure-client-generator-core-deserialize-empty-string-as-null
    • azure-encode-duration
    • azure-resource-manager-large-header
    • azure-resource-manager-non-resource

Context

These changes ensure that the autorest.python test suite includes the same test scenarios as the TypeSpec repository, maintaining consistency across both codebases for several spector scenarios including error handling, large headers, non-resource operations, and empty string deserialization.

Fixes #3106.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot AI changed the title [WIP] [Copilot] Add test cases [Copilot] Add test cases from TypeSpec PR #7693 Jun 25, 2025
Copilot AI requested a review from msyyc June 25, 2025 08:20
Copilot finished work on behalf of msyyc June 25, 2025 08:20
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot AI requested a review from msyyc June 25, 2025 08:34
Copilot finished work on behalf of msyyc June 25, 2025 08:34
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot finished work on behalf of msyyc June 25, 2025 08:43
@msyyc msyyc marked this pull request as ready for review June 25, 2025 08:53
@msyyc msyyc enabled auto-merge (squash) June 25, 2025 10:55
@msyyc msyyc merged commit 8c68bac into main Jun 25, 2025
15 checks passed
@msyyc msyyc deleted the copilot/fix-3106 branch June 25, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Copilot] Add test cases

4 participants