Skip to content

[python] Add test case for GroupParameters.group override applying to all languages#10332

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

[python] Add test case for GroupParameters.group override applying to all languages#10332
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-4220

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Azure/typespec-azure#4220 removed the "!javascript" scope exclusion from @@override on GroupParameters.group, making parameter grouping apply to all languages. This adds Python mock API tests that explicitly validate the resulting SDK signature.

Changes

  • package.json: Bump @azure-tools/azure-http-specs from 0.1.0-alpha.390.1.0-alpha.40-dev.2 (first version published after the PR merge)
  • test_azure_client_generator_core_override.py / *_async.py: Add test_group_parameters_signature (sync + async) verifying that group_parameters.group exposes param1 and param2 as keyword-only required parameters — the expected result of the GroupParametersOptions grouping override:
def test_group_parameters_signature(client: OverrideClient):
    group_method = client.group_parameters.group
    sig = inspect.signature(group_method)
    params = sig.parameters

    assert params["param1"].kind == params["param1"].KEYWORD_ONLY
    assert params["param2"].kind == params["param2"].KEYWORD_ONLY
    assert params["param1"].default == params["param1"].empty
    assert params["param2"].default == params["param2"].empty

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/Azure/typespec-azure/pulls/4220/files
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
    • Triggering command: /usr/bin/curl curl -sv REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@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 9, 2026
Copilot AI changed the title [WIP] Add test case for pull request 4220 [python] Add test case for GroupParameters.group override applying to all languages Apr 9, 2026
Copilot AI requested a review from msyyc April 9, 2026 23:03
Copilot finished work on behalf of msyyc April 9, 2026 23:03
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/4220

2 participants