Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/http-client-python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log - @typespec/http-client-python

## 0.6.8

### Bug Fixes

- Fix for scenario that output folder is different with namespace

## 0.6.7

### Bug Fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,12 @@ def exec_path_compensation(self) -> Path:
else Path(".")
)

def exec_path_for_test_sample(self, namespace: str) -> Path:
return self.exec_path_compensation / Path(*namespace.split("."))

def exec_path(self, namespace: str) -> Path:
if self.code_model.options["no_namespace_folders"] and not self.code_model.options["multiapi"]:
return Path(".")
return self.exec_path_compensation / Path(*namespace.split("."))

@property
Expand All @@ -492,7 +497,7 @@ def _additional_folder(self) -> Path:
return Path("")

def _serialize_and_write_sample(self, env: Environment, namespace: str):
out_path = self.exec_path(namespace) / Path("generated_samples")
out_path = self.exec_path_for_test_sample(namespace) / Path("generated_samples")
for client in self.code_model.clients:
for op_group in client.operation_groups:
for operation in op_group.operations:
Expand Down Expand Up @@ -526,7 +531,7 @@ def _serialize_and_write_sample(self, env: Environment, namespace: str):

def _serialize_and_write_test(self, env: Environment, namespace: str):
self.code_model.for_test = True
out_path = self.exec_path(namespace) / Path("generated_tests")
out_path = self.exec_path_for_test_sample(namespace) / Path("generated_tests")
general_serializer = TestGeneralSerializer(code_model=self.code_model, env=env)
self.write_file(out_path / "conftest.py", general_serializer.serialize_conftest())
if not self.code_model.options["azure_arm"]:
Expand Down
Loading