Skip to content

Commit

Permalink
Multiapi test gen otpimization (#2692)
Browse files Browse the repository at this point in the history
* optimize test generation for multiapi

* changelog
  • Loading branch information
msyyc committed Jul 12, 2024
1 parent 23f3aa1 commit 6e93675
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .chronus/changes/multiapi-test-gen-2024-6-11-18-2-26.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: feature
packages:
- "@azure-tools/typespec-python"
---

Optimize test generation for multiapi package
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,10 @@ def _serialize_and_write_test(self, env: Environment, namespace_path: Path):

for client in self.code_model.clients:
for og in client.operation_groups:
if self.code_model.options["multiapi"] and any(
o.api_versions[0] != self.code_model.options["default_api_version"] for o in og.operations
):
continue
test_serializer = TestSerializer(self.code_model, env, client=client, operation_group=og)
for is_async in (True, False):
try:
Expand Down

0 comments on commit 6e93675

Please sign in to comment.