From b9cb2f2e18708f281e0d89cb033433cb01b31bb6 Mon Sep 17 00:00:00 2001 From: Marcin Rudolf Date: Mon, 9 Oct 2023 22:45:28 +0200 Subject: [PATCH] fixes glob pattern --- dlt/common/storages/fsspec_filesystem.py | 2 +- tests/common/storages/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlt/common/storages/fsspec_filesystem.py b/dlt/common/storages/fsspec_filesystem.py index 155b111f1e..93d3d37bbc 100644 --- a/dlt/common/storages/fsspec_filesystem.py +++ b/dlt/common/storages/fsspec_filesystem.py @@ -178,7 +178,7 @@ def guess_mime_type(file_name: str) -> str: def glob_files( - fs_client: AbstractFileSystem, bucket_url: str, file_glob: str = "**/*" + fs_client: AbstractFileSystem, bucket_url: str, file_glob: str = "**" ) -> Iterator[FileItem]: """Get the files from the filesystem client. diff --git a/tests/common/storages/utils.py b/tests/common/storages/utils.py index 14fffb668d..6900c6fdcf 100644 --- a/tests/common/storages/utils.py +++ b/tests/common/storages/utils.py @@ -43,7 +43,7 @@ def assert_sample_files(all_file_items: List[FileItem], filesystem: AbstractFile assert isinstance(lines[0], str) assert len(all_file_items) == 10 - assert [item["file_name"] for item in all_file_items] == [ + assert set([item["file_name"] for item in all_file_items]) == { 'csv/freshman_kgs.csv', 'csv/freshman_lbs.csv', 'csv/mlb_players.csv', @@ -54,4 +54,4 @@ def assert_sample_files(all_file_items: List[FileItem], filesystem: AbstractFile 'met_csv/A803/A803_20230920.csv', 'parquet/mlb_players.parquet', 'sample.txt' - ] \ No newline at end of file + } \ No newline at end of file