Skip to content

Commit cd0c772

Browse files
authored
Enable skipped Python SDK mock API tests after TCGC 0.67.0 upgrade (#3429)
* Update dependencies * Sync shared files from typespec repo (2026-04-08 09:45:28) * Add changelog * Update dependencies (2026-04-08 09:46:32) --------- Co-authored-by: AutoPrFromHttpClientPython <AutoPrFromHttpClientPython>
1 parent 7253130 commit cd0c772

10 files changed

+43
-76
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
changeKind: internal
3+
packages:
4+
- "@autorest/python"
5+
- "@azure-tools/typespec-python"
6+
---
7+
8+
Enable previously skipped client structure and client operation group mock API tests after TCGC 0.67.0 upgrade; remove obsolete `test_spread_record_discriminated_union` tests whose Spector scenario was removed.

packages/autorest.python/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"homepage": "https://github.com/Azure/autorest.python/blob/main/README.md",
3131
"dependencies": {
32-
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjEyMjcwMy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.28.3.tgz",
32+
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjEyMzY4MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.28.3.tgz",
3333
"@autorest/system-requirements": "~1.0.2",
3434
"fs-extra": "~11.2.0",
3535
"tsx": "^4.21.0"

packages/typespec-python/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"@typespec/xml": ">=0.81.0 <1.0.0"
6666
},
6767
"dependencies": {
68-
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjEyMjcwMy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.28.3.tgz",
68+
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjEyMzY4MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.28.3.tgz",
6969
"fs-extra": "~11.2.0",
7070
"js-yaml": "~4.1.0",
7171
"semver": "~7.6.2",

packages/typespec-python/tests/mock_api/azure/asynctests/test_client_structure_async.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,25 @@ async def test_structure_multiclient():
3838
await client_b.renamed_six()
3939

4040

41-
@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
4241
@pytest.mark.asyncio
4342
async def test_structure_renamed_operation():
4443
client = RenamedOperationClient(endpoint="http://localhost:3000", client=ClientType.RENAMED_OPERATION)
4544
await client.renamed_one()
4645
await client.renamed_three()
4746
await client.renamed_five()
4847

49-
await client.renamed_two()
50-
await client.renamed_four()
51-
await client.renamed_six()
48+
await client.group.renamed_two()
49+
await client.group.renamed_four()
50+
await client.group.renamed_six()
5251

5352

54-
@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
5553
@pytest.mark.asyncio
5654
async def test_structure_two_operation_group():
5755
client = TwoOperationGroupClient(endpoint="http://localhost:3000", client=ClientType.TWO_OPERATION_GROUP)
58-
await client.one()
59-
await client.three()
60-
await client.four()
56+
await client.group1.one()
57+
await client.group1.three()
58+
await client.group1.four()
6159

62-
await client.two()
63-
await client.five()
64-
await client.six()
60+
await client.group2.two()
61+
await client.group2.five()
62+
await client.group2.six()

packages/typespec-python/tests/mock_api/azure/asynctests/test_client_structure_clientoperationgroup_async.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,22 @@
88
from client.structure.clientoperationgroup.aio import FirstClient, SecondClient
99

1010

11-
@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
1211
@pytest.mark.asyncio
1312
async def test_first_client_operations():
1413
client = FirstClient(endpoint="http://localhost:3000", client=ClientType.CLIENT_OPERATION_GROUP)
1514

1615
await client.one()
1716

18-
await client.two()
19-
await client.three()
17+
await client.group3.two()
18+
await client.group3.three()
2019

21-
await client.four()
20+
await client.group4.four()
2221

2322

24-
@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
2523
@pytest.mark.asyncio
2624
async def test_second_client_operations():
2725
client = SecondClient(endpoint="http://localhost:3000", client=ClientType.CLIENT_OPERATION_GROUP)
2826

2927
await client.five()
3028

31-
await client.six()
29+
await client.group5.six()

packages/typespec-python/tests/mock_api/azure/test_client_structure.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Licensed under the MIT License. See License.txt in the project root for
44
# license information.
55
# --------------------------------------------------------------------------
6-
import pytest
76
from client.structure.service.models import ClientType
87
from client.structure.service import ServiceClient
98
from client.structure.multiclient import ClientAClient, ClientBClient
@@ -36,25 +35,23 @@ def test_structure_multiclient():
3635
client_b.renamed_six()
3736

3837

39-
@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
4038
def test_structure_renamed_operation():
4139
client = RenamedOperationClient(endpoint="http://localhost:3000", client=ClientType.RENAMED_OPERATION)
4240
client.renamed_one()
4341
client.renamed_three()
4442
client.renamed_five()
4543

46-
client.renamed_two()
47-
client.renamed_four()
48-
client.renamed_six()
44+
client.group.renamed_two()
45+
client.group.renamed_four()
46+
client.group.renamed_six()
4947

5048

51-
@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
5249
def test_structure_two_operation_group():
5350
client = TwoOperationGroupClient(endpoint="http://localhost:3000", client=ClientType.TWO_OPERATION_GROUP)
54-
client.one()
55-
client.three()
56-
client.four()
51+
client.group1.one()
52+
client.group1.three()
53+
client.group1.four()
5754

58-
client.two()
59-
client.five()
60-
client.six()
55+
client.group2.two()
56+
client.group2.five()
57+
client.group2.six()

packages/typespec-python/tests/mock_api/azure/test_client_structure_clientoperationgroup.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,24 @@
33
# Licensed under the MIT License. See License.txt in the project root for
44
# license information.
55
# --------------------------------------------------------------------------
6-
import pytest
76
from client.structure.clientoperationgroup.models import ClientType
87
from client.structure.clientoperationgroup import FirstClient, SecondClient
98

109

11-
@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
1210
def test_first_client_operations():
1311
client = FirstClient(endpoint="http://localhost:3000", client=ClientType.CLIENT_OPERATION_GROUP)
1412

1513
client.one()
1614

17-
client.two()
18-
client.three()
15+
client.group3.two()
16+
client.group3.three()
1917

20-
client.four()
18+
client.group4.four()
2119

2220

23-
@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
2421
def test_second_client_operations():
2522
client = SecondClient(endpoint="http://localhost:3000", client=ClientType.CLIENT_OPERATION_GROUP)
2623

2724
client.five()
2825

29-
client.six()
26+
client.group5.six()

packages/typespec-python/tests/mock_api/shared/asynctests/test_typetest_property_additionalproperties_async.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -263,22 +263,6 @@ async def test_spread_model_array(client: AdditionalPropertiesClient):
263263
await client.spread_model_array.put(body)
264264

265265

266-
@pytest.mark.skip(reason="https://github.com/microsoft/typespec/pull/6425")
267-
@pytest.mark.asyncio
268-
async def test_spread_record_discriminated_union(client: AdditionalPropertiesClient):
269-
body = {
270-
"name": "abc",
271-
"prop1": {"fooProp": "abc", "kind": "kind0"},
272-
"prop2": {
273-
"end": "2021-01-02T00:00:00Z",
274-
"kind": "kind1",
275-
"start": "2021-01-01T00:00:00Z",
276-
},
277-
}
278-
assert await client.spread_record_discriminated_union.get() == body
279-
await client.spread_record_discriminated_union.put(body)
280-
281-
282266
@pytest.mark.asyncio
283267
async def test_spread_record_non_discriminated_union(
284268
client: AdditionalPropertiesClient,

packages/typespec-python/tests/mock_api/shared/test_typetest_property_additionalproperties.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -236,21 +236,6 @@ def test_spread_model_array(client: AdditionalPropertiesClient):
236236
client.spread_model_array.put(body)
237237

238238

239-
@pytest.mark.skip(reason="https://github.com/microsoft/typespec/pull/6425")
240-
def test_spread_record_discriminated_union(client: AdditionalPropertiesClient):
241-
body = {
242-
"name": "abc",
243-
"prop1": {"fooProp": "abc", "kind": "kind0"},
244-
"prop2": {
245-
"end": "2021-01-02T00:00:00Z",
246-
"kind": "kind1",
247-
"start": "2021-01-01T00:00:00Z",
248-
},
249-
}
250-
assert client.spread_record_discriminated_union.get() == body
251-
client.spread_record_discriminated_union.put(body)
252-
253-
254239
def test_spread_record_non_discriminated_union(client: AdditionalPropertiesClient):
255240
body = {
256241
"name": "abc",

pnpm-lock.yaml

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)