From cee1761f78db3fa261301fa95967c09edd5682ab Mon Sep 17 00:00:00 2001 From: Peter Bull Date: Sat, 27 Jul 2024 23:03:18 -0700 Subject: [PATCH] add rigs back; make explicit no dirs --- cloudpathlib/azure/azblobclient.py | 7 ++++++- tests/conftest.py | 14 +++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/cloudpathlib/azure/azblobclient.py b/cloudpathlib/azure/azblobclient.py index 5a008572..498fe385 100644 --- a/cloudpathlib/azure/azblobclient.py +++ b/cloudpathlib/azure/azblobclient.py @@ -277,7 +277,12 @@ def _list_dir( # walk_blobs returns folders with a trailing slash blob_path = blob.name.rstrip("/") blob_cloud_path = self.CloudPath(f"az://{cloud_path.container}/{blob_path}") - yield blob_cloud_path, isinstance(blob, BlobPrefix) + + yield blob_cloud_path, ( + isinstance(blob, BlobPrefix) + if not recursive + else False # no folders from list_blobs in non-hns storage accounts + ) def _move_file( self, src: AzureBlobPath, dst: AzureBlobPath, remove_src: bool = True diff --git a/tests/conftest.py b/tests/conftest.py index 01d48059..c272108e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -452,12 +452,12 @@ def local_s3_rig(request, monkeypatch, assets_dir): [ azure_rig, # azure_rig0 azure_gen2_rig, # azure_rig1 - # gs_rig, - # s3_rig, - # custom_s3_rig, - # local_azure_rig, - # local_s3_rig, - # local_gs_rig, + gs_rig, + s3_rig, + custom_s3_rig, + local_azure_rig, + local_s3_rig, + local_gs_rig, ], ) @@ -466,6 +466,6 @@ def local_s3_rig(request, monkeypatch, assets_dir): "s3_like_rig", [ s3_rig, - # custom_s3_rig, + custom_s3_rig, ], )