20
20
)
21
21
from tests .filesystem .utils import unpack_factory_args
22
22
23
- from .settings import GLOB_RESULTS , FACTORY_ARGS
23
+ from .settings import GLOBS , GLOB_TEST_IDS , FACTORY_ARGS , FACTORY_TEST_IDS
24
24
25
25
26
- @pytest .mark .parametrize ("factory_args" , FACTORY_ARGS )
27
- @pytest .mark .parametrize ("glob_params " , GLOB_RESULTS )
28
- def test_file_list (factory_args : Dict [str , Any ], glob_params : Dict [str , Any ]) -> None :
26
+ @pytest .mark .parametrize ("factory_args" , FACTORY_ARGS , ids = FACTORY_TEST_IDS )
27
+ @pytest .mark .parametrize ("globs " , GLOBS , ids = GLOB_TEST_IDS )
28
+ def test_file_list (factory_args : Dict [str , Any ], globs : Dict [str , Any ]) -> None :
29
29
bucket_url , kwargs = unpack_factory_args (factory_args )
30
30
31
31
@dlt .transformer
32
32
def bypass (items ) -> str :
33
33
return items
34
34
35
35
# we only pass the glob parameter to the resource if it is not None
36
- if file_glob := glob_params ["glob" ]:
36
+ if file_glob := globs ["glob" ]:
37
37
filesystem_res = (
38
38
filesystem (
39
39
bucket_url = bucket_url ,
@@ -48,8 +48,8 @@ def bypass(items) -> str:
48
48
all_files = list (filesystem_res )
49
49
file_count = len (all_files )
50
50
file_names = [item ["file_name" ] for item in all_files ]
51
- assert file_count == len (glob_params ["file_names" ])
52
- assert file_names == glob_params ["file_names" ]
51
+ assert file_count == len (globs ["file_names" ])
52
+ assert file_names == globs ["file_names" ]
53
53
54
54
55
55
@pytest .mark .parametrize ("extract_content" , [True , False ])
0 commit comments