@@ -316,8 +316,8 @@ def test_download_without_target_dir(mapdl, files_to_download, expected_output):
316
316
[
317
317
["txt" , "myfile*" , ["myfile0.txt" , "myfile1.txt" ]],
318
318
["txt" , "myfile0" , ["myfile0.txt" ]],
319
- ["err" , "file" , [ "file .err"] ],
320
- ["err" , "*" , [ "file.err" ] ],
319
+ [None , "file* .err" , None ],
320
+ ["err" , "*" , None ],
321
321
],
322
322
)
323
323
def test_download_with_extension (
@@ -327,11 +327,19 @@ def test_download_with_extension(
327
327
write_tmp_in_mapdl_instance (mapdl , "myfile1" )
328
328
329
329
list_files = mapdl .download (files_to_download , extension = extension_to_download )
330
- assert len (expected_output ) == len (list_files )
331
330
332
- for file_to_check in expected_output :
333
- assert file_to_check in list_files
334
- assert os .path .exists (file_to_check )
331
+ if extension_to_download == "err" or files_to_download .endswith ("err" ):
332
+ remote_list_files = mapdl .list_files ()
333
+
334
+ assert all (
335
+ [each .endswith ("err" ) and each in remote_list_files for each in list_files ]
336
+ )
337
+ else :
338
+ assert len (expected_output ) == len (list_files )
339
+
340
+ for file_to_check in expected_output :
341
+ assert file_to_check in list_files
342
+ assert os .path .exists (file_to_check )
335
343
336
344
337
345
@skip_in_cloud # This is going to run only in local
0 commit comments